Apache Commands

Apache is an Open Source Web server available in today’s market freely. Current Apache Web Server released version is 2.44.33. This is used to host the website on servers.

Let’s start Apache Troubleshooting  

  1. Check Apache service is running or not

Here you have to check the apache service is running or not to troubleshoot by command

Systemctl status httpd

  1. If service is running , Check the logs of Apache

This logs will help you to see the what errors you’re getting in Apache Configuration file and what is the reason of not working Apache

/var/log/httpd/error_log and /var/log/httpd/access_log

  1. Check the Apache configuration file syntax

httpd –t

  1. Check virtual host configuration definition

httpd –S

  1. Check modules

Will show you the list of loaded static and shared modules.

httpd –M

  1. Run Apache in debug mode

httpd –X

  1. Check file config

This will help you to find a file conflict on startup in the directive

httpd –f filename

You’re done

Sponsored

LEAVE A REPLY

Please enter your comment!
Please enter your name here