54_Install application in Bastion server and validate the connectivity - Nirvan-Pandey/OCI_DOC GitHub Wiki
The purpose of this lab is to install an application on the Bastion server (public subnet) and validate its connectivity. This document outlines the steps required to complete the installation and verification process.
-
Login to Bastion Server
-
Switch to root user:
sudo su - root
- Install the HTTPD package:
yum install httpd -y
- Start the HTTPD service and check its status:
systemctl start httpd
systemctl status httpd
- Verify that the service is listening on port 80:
netstat -plan | grep -i 80
- Navigate to the web directory:
cd /var/www/html/
- List files in the directory to confirm location:
ls -lrth
- Create and edit an index.html file:
vi index.html
Add the following content inside the file:
<html>
<head>
<title>Bastion Server</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
margin-top: 50px;
}
h1 {
color: #2c3e50;
}
p {
font-size: 18px;
color: #34495e;
}
</style>
</head>
<body>
<h1>Welcome to the Bastion Server!</h1>
<p><strong>VCN:</strong> Hub_VCN_Public_Subnet</p>
<p><strong>Private IP:</strong> 172.0.0.246</p>
<p>Server is up and running. Enjoy secure access!</p>
</body>
</html>
Save and exit the file.
- Verify the content of the index.html file:
cat index.html
- Check the public IP of the Bastion Server1.
- Access the application from a web browser:
Open a browser and navigate to:
http:129.159.118.103
Bastion server's web page is not loading, let's troubleshoot the issue step by step.
- Go to Hub VCN of the Bastion server1.
- Navigate to Hub VCN subnet
- Verify Security List Rules
- HTTP works on port 80 and there is no rule defined in ingress rule.
- Validating the URL again in the browser(Unsuccessful)
- Checking the status of firewalld.
systemctl status firewalld
Its active.
- Disabling the firewall.
systemctl stop firewalld
- Validating in the browser. (Successful)
This lab successfully installed the HTTPD application on a Bastion server, configured a basic web page, and validated its accessibility over the public internet.