54_Install application in Bastion server and validate the connectivity - Nirvan-Pandey/OCI_DOC GitHub Wiki

54_1: Overview

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.

54_2: Installation Steps

  1. Login to Bastion Server image

  2. Switch to root user:

sudo su - root

image

  1. Install the HTTPD package:
yum install httpd -y

image image

  1. Start the HTTPD service and check its status:
systemctl start httpd
systemctl status httpd

image

  1. Verify that the service is listening on port 80:
netstat -plan | grep -i 80

image

  1. Navigate to the web directory:
cd /var/www/html/
  1. List files in the directory to confirm location:
ls -lrth

image

  1. 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.

image image

  1. Verify the content of the index.html file:
cat index.html

image

54_3: Validation

  1. Check the public IP of the Bastion Server1.

image

  1. Access the application from a web browser:

Open a browser and navigate to:

http:129.159.118.103

image

Bastion server's web page is not loading, let's troubleshoot the issue step by step.

54_4: Troubleshooting

  1. Go to Hub VCN of the Bastion server1.

image image

  1. Navigate to Hub VCN subnet

image

  1. Verify Security List Rules

image image

  1. HTTP works on port 80 and there is no rule defined in ingress rule.

image image image

  1. Validating the URL again in the browser(Unsuccessful)

image

  1. Checking the status of firewalld.
 systemctl status firewalld

image

Its active.

  1. Disabling the firewall.
systemctl stop firewalld

image

  1. Validating in the browser. (Successful)

image

54_5: Conclusion

This lab successfully installed the HTTPD application on a Bastion server, configured a basic web page, and validated its accessibility over the public internet.

⚠️ **GitHub.com Fallback** ⚠️