Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do I need to restart apache after configuring httpd.conf

Status
Not open for further replies.

lsmail

Technical User
Dec 25, 2002
12
US
Hello,

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?

Thanks
 
Hi mate,

Apache loads the configuration files when it first launches and no changes will take effect until you restart Apache.

Hope this helps Wullie

- Send your e-mail to santa!! [santa]

The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top