Test the Apache configuration file httpd.conf

Contributor Icon Contributed by qmchenry  
Tag Icon Tagged: Apache web server  

After making changes to the Apache configuration file, it is a good practice to test the configuration before implementing it.


To test the Apache configuration file for errors:

apachectl configtest

If the configuration file is fine, this command will return Syntax Ok. Otherwise, it will return detailed information about the error discovered.

If apachectl is not in your PATH and you don’t know where it is, refer to the recipe Find a file by name to find the location of apachectl, then run it with the fully qualified path, for example:

/usr/local/apache/bin/apachectl configtest

 

2 Comments -


  1. Sjur Sørskår said on March 18, 2009

    For win users this output is given by httpd.exe from console window

  2. Omer said on September 12, 2009

    apachectl -t -f /path/to/the/conf/file/youwant/tested/httpd.conf

 

RSS feed for comments on this post. TrackBack URL

Leave a comment -