How to Find Apache Web Server Syntax Error

Executing the following command, that will detect syntax errors:

Centos/RHEL

# /usr/sbin/httpd -t

Debian/Ubuntu

# /usr/sbin/apache-perl -t

If no error in your config files it will return with

Syntax OK

if you get an error vi the config file and make adjustments

For Centos/RHEL
# vi +linenumber /etc/httpd/conf/httpd.conf

For debian/Ubuntu
# vi +linenumber /etc/apache-perl/httpd.conf

Leave a Reply

Your email address will not be published. Required fields are marked *