How do I check for syntax errors in my Apache web server configuration
18,118
Solution 1
If syntax is ok:
sudo apache2ctl configtest
Will reply with:
Syntax OK
Solution 2
You can use this as well if you don't have httpd.
apachectl configtest
Solution 3
On linux, you use
/usr/sbin/httpd -t
On windows, you would use the equivalent command to the httpd.exe file
Comments
-
Cosmin Atanasiu almost 2 years
How do I check for syntax errors in the configuration of my apache server without having to restart or reload the rules? This would be preferably done from the terminal/command line.