Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I check for syntax errors in my Apache web server configuration

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.

like image 810
Cosmin Atanasiu Avatar asked Jul 11 '12 23:07

Cosmin Atanasiu


2 Answers

If syntax is ok:

sudo apache2ctl configtest

Will reply with:

Syntax OK

like image 174
Nahid Avatar answered Oct 25 '22 04:10

Nahid


You can use this as well if you don't have httpd.

apachectl configtest
like image 23
prashant Avatar answered Oct 25 '22 03:10

prashant