Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 Feb 7 '11 at 13:30

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

up vote 66 down vote accepted


apachectl configtest
share|improve this answer

Another way is httpd -t. Therefore, it's available in Windows-version of Apache. Check

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


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.