Lab Information
xFusionCorp Industries uses some monitoring tools to check the status of every service, application, etc running on the systems. Recently, the monitoring system identified that Apache service is not running on some of the Nautilus Application Servers in Stratos Datacenter.
Identify the faulty Nautilus Application Server and fix the issue. Also, make sure Apache service is up and running on all Nautilus Application Servers. Do not try to stop any kind of firewall that is already running.
Apache is running on 5004 port on all Nautilus Application Servers and its document root must be /var/www/html on all app servers.
Finally you can test from jump host using curl command to access Apache on all app servers and it should be reachable and you should get some static page. E.g. curl http://stapp01:5004/.
Lab Solutions
π§ Part 1: Lab Step-by-Step Guidelines
1οΈβ£ Login to jump host
ssh thor@jump_host
# Password: mjolnir123
2οΈβ£ Identify faulty app server
Test all servers:
curl http://stapp01:5004/
curl http://stapp02:5004/
curl http://stapp03:5004/
3οΈβ£ Login to faulty server
Example:
ssh tony@stapp01
# Password : Ir0nM@n
sudo -i
(Use correct user for each server)
4οΈβ£ Check Apache status
systemctl status httpd
5οΈβ£ Fix Apache issues
β
Set correct port (5004)
vi /etc/httpd/conf/httpd.conf
Check:
Listen 5004
β
Start and enable Apache
systemctl restart httpd
systemctl enable httpd
systemctl status httpd
6οΈβ£ Verify locally on that server
curl http://stapp01:5004/
7οΈβ£ Repeat check on all app servers
Login to each:
ssh steve@stapp02
# Password : Am3ric@
sudo -i
sudo systemctl status httpd
sudo systemctl restart httpd
journalctl -xeu httpd.service
# Change ServerRoot "/etc/httpd"
vi /etc/httpd/conf/httpd.conf
systemctl restart httpd
systemctl enable httpd
systemctl status httpd
curl http://stapp02:5004/
ssh banner@stapp03
# Password: BigGr33n
sudo -i
sudo systemctl status httpd
sudo systemctl restart httpd
journalctl -xeu httpd.service
# Uncomment Listen 5004 and Add " " at DocumentRoot "/var/www/html"
vi /etc/httpd/conf/httpd.conf
systemctl restart httpd
systemctl enable httpd
systemctl status httpd
curl http://stapp03:5004/
π All must be running
π All should return a webpage
π§ Part 2: Simple Step-by-Step Explanation (Beginner Friendly)
What this lab is about
You are fixing a real production issue:
Some servers are working, some are broken β find and fix them
Step 1: Find which server is broken
curl http://stapp01:5004/
curl http://stapp02:5004/
curl http://stapp03:5004/
π This is like checking:
βWhich machine is not responding?β
If it shows a page β β
working
If it fails β β faulty server
Step 2: Check Apache service
systemctl status httpd
π This tells you:
Is Apache running or stopped?
Step 3: Fix configuration issues
You checked logs:
journalctl -xeu httpd.service
π Logs tell you:
Why Apache failed
Common problems you fixed
π΄ Problem 1: Wrong ServerRoot
ServerRoot /var/www/html β
π This is wrong because:
ServerRoot = where Apache system files are stored
Correct:
ServerRoot "/etc/httpd" β
π΄ Problem 2: Port not configured
Listen 5004
π Apache must listen on the correct port, otherwise:
curl http://server:5004 β will fail
π΄ Problem 3: DocumentRoot formatting
DocumentRoot /var/www/html β
Correct:
DocumentRoot "/var/www/html" β
π Quotes are important in Apache config.
Step 4: Restart Apache
systemctl restart httpd
π Applies your fixes.
Step 5: Verify again
curl http://stapp02:5004/
π Now it should work.
Step 6: Repeat for all servers
Each server can have different issues:
Server Issue
stapp01 may be OK
stapp02 ServerRoot broken
stapp03 Listen/DocumentRoot issue
π So you fix each one individually
π Final Flow (Very Important)
Test β Find broken server β Check service β Check logs β Fix config β Restart β Test again
β‘ Key Concepts You Learned
1οΈβ£ Services depend on config
Wrong config β service wonβt start
2οΈβ£ Logs are your best friend
journalctl -xeu httpd.service
π Always tells the real problem
3οΈβ£ Apache has strict syntax
Small mistake β full service failure
4οΈβ£ Ports must match requirement
Apache must listen on 5004
β
Final Result
All app servers:
β Apache running
β Port 5004 working
β curl returns webpage
π― Key Takeaway
Donβt guess β Test β Read logs β Fix exactly whatβs broken
Top comments (0)