Troubleshooting Commands For Apache Web Server

Troubleshooting Commands For Apache Web Server

Troubleshooting Commands For Apache is an Open Source Web server available in today’s market. The current Apache Web Server released version is 2.44.33. This is used to host the website on servers. we can troubleshoot the apache webserver using the below commands in Linux.

Check Out: Installation of Awstats For Analyzing Apache Logs

Let’s start Apache Troubleshooting

1. Check Apache service is running or not.  

You have to check the Apache service is running or not by the below command.

systemctl status httpd

Troubleshooting Commands For Apache

2. If the service is running, check the logs of Apache.

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

Check Out: Disable HTTP TRACE or TRACK Request In httpd (Apache)

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

troubleshooting apache web server

3. Check the Apache configuration file syntax

httpd –t

apache web server troubleshoot

4. Check virtual host configuration definition

httpd –S

5. Check modules

I will show you the list of loaded Static and shared modules.

httpd –M

6. Run Apache in debug mode

httpd –X

Check Out: Configuration Of mod_security in Apache

7. Check file config

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

httpd –f filename

You’re done troubleshoot apache linux

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment