I need to change or add virtual host into my httpd.conf, Do I need to restart apache or something else after I add these new virtual host domain and change my http.conf?
You do need to restart, but I would suggest to use:
kill -USR1 `cat /var/run/httpd.pid`
as this will gracefully restart the server, in other words, apache will kill all of the child servers that are not serving clients, and have them reload with the new config, and when the childs that are serving clints are done, they will be killed and regenerated also.
In some other words, it restarts apache without ANY downtime, UNLESS you have an error in you http.conf file, and apache will die....
In addition to the good answers you have so far, I'm casting my .02 in here too. Apache comes with a binary that does the restart nicely for you too. Try running "
Code:
apachectl restart
". The "
Code:
apachectl
" program is (I believe) native to Apache itself. Some distros have builtin shortcuts too, like Mandrake's "
Code:
services httpd restart
".
Just another tidbit of information overkill for ya ;-) --
JR
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.