Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im looking for a command that checks the validity of the config files in apache server (both Debian and RHEL distros - need to do it prior to restart, so there will be no downtime). I cant quite remember what it is and man pages / quick googling didnt have an answer. Thanks.

share|improve this question

migrated from stackoverflow.com Feb 7 '11 at 13:30

This question came from our site for professional and enthusiast programmers.

up vote 65 down vote accepted

Check: http://httpd.apache.org/docs/2.2/programs/apachectl.html

apachectl configtest
share|improve this answer

Another way is httpd -t. Therefore, it's available in Windows-version of Apache. Check http://httpd.apache.org/docs/2.4/programs/httpd.html

share|improve this answer

apachectl configtest is the correct answer. Unfortunately I've got a windows installation where apachectl is missing. Here calling httpd also helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.