[root@evil vhosts]# mv dicks.stalinplayschesswithsheep.com.conf.not dicks.stalinplayschesswithsheep.com.conf
If configtest returns "Syntax OK", then proceed to run "service httpd graceful", and then make sure that the sites are still up. If you see any syntax errors, or anything other than "Syntax OK", put it back and try to figure out what went wrong.
Please always use configtest if you are making a change, as it serves as an early warning if anything is fucked up.
[root@evil vhosts]# echo "dicks" >> dicks.stalinplayschesswithsheep.com.conf
[root@evil vhosts]# service httpd configtest
Syntax error on line 22 of /etc/httpd/conf/vhosts/dicks.stalinplayschesswithsheep.com.conf:
Invalid command 'dicks', perhaps misspelled or defined by a module not included in the server configuration
[root@evil vhosts]#
Please also use graceful when actually restarting, for two reasons. One, it gracefully kills all the Apache subprocesses and restarts them with the updated config, so there's less downtime doing that than bouncing the service entirely. Two, it also tests the configuration, and will refuse to restart anything until it's fixed.
[root@evil vhosts]# service httpd graceful
apachectl: Configuration syntax error, will not run "graceful":
Syntax error on line 22 of /etc/httpd/conf/vhosts/dicks.stalinplayschesswithsheep.com.conf:
Invalid command 'dicks', perhaps misspelled or defined by a module not included in the server configuration
[root@evil vhosts]# ps fauxww | grep httpd
root 3333 0.0 0.0 182572 6924 ? Ss Aug17 1:19 /usr/sbin/httpd.worker
apache 8413 0.0 0.0 182572 3756 ? S Sep20 0:00 \_ /usr/sbin/httpd.worker
apache 8415 0.0 0.1 2165232 16724 ? Sl Sep20 0:03 \_ /usr/sbin/httpd.worker
apache 8418 0.0 0.1 2165232 16656 ? Sl Sep20 0:03 \_ /usr/sbin/httpd.worker
apache 8498 0.0 0.1 2165232 17452 ? Sl Sep20 0:03 \_ /usr/sbin/httpd.worker
root 13717 0.0 0.0 103244 816 pts/0 S+ 15:20 0:00 | \_ grep httpd
[root@evil vhosts]#
[root@evil vhosts]# sed -i '/^dicks$/d' dicks.stalinplayschesswithsheep.com.conf
[root@evil vhosts]# service httpd configtest
Syntax OK
[root@evil vhosts]# service httpd graceful
[root@evil vhosts]#
So, configtest then graceful.
And that's it! Any questions, please ask me.