Apache Troubleshooting

Apache Troubleshooting

ยท

2 min read

Task Requirements :

Our Industries use some monitoring tools to check the status of every service and application running on the systems. Recently, the monitoring system identified that the Apache service is not running on some of the Application Servers in the Datacenter.

  1. Identify the faulty Application Server and fix the issue. Also, make sure Apache service is up and running on all Application Servers. Do not try to stop any kind of firewall that is already running.

  2. Apache is running on a 6300 port on all Application Servers and its document root must be /var/www/html on all app servers.

  3. Finally, you can test from the jump host using the curl command to access Apache on all app servers and it should be reachable and you should get some static page. E.g. curl 172.16.xxx.xx:6300.

Execution :

Identify the Faulty Nautilus Application Server

  • Check the status of the Apache service on all Nautilus Application Servers. Connect to each server and run the following command.

    sudo systemctl start httpd

    sudo systemctl status httpd

For App Server 1, the error message indicates a syntax error on line 34 of the Apache configuration file (/etc/httpd/conf/httpd.conf). Let's address this issue

For App Server 2, the error message indicates a syntax error in the Apache configuration file of /etc/httpd/conf/httpd.conf. The specific error is "Invalid command 'Listen 6300'". This suggests that the Listen directive with port number 6300 is not recognized or has a syntax issue. Also, an error message indicates a syntax error on the Apache configuration file (/etc/httpd/conf/httpd.conf). Specifically, it states that the DocumentRoot '/var/www/html;' is not a directory, or it does not exist.

  • To address the issues open the Apache configuration file using a text editor and address the issues accordingly.

    sudo vi /etc/httpd/conf/httpd.conf

After making these changes, restart the Apache service and check the status of Apache to ensure it is running without errors.

sudo systemctl restart httpd

sudo systemctl status httpd

App Server 1

App Server 2

Finally, you can test from the jump host using the curl command to access Apache on all app servers.

ย