Web Hosting Talk







View Full Version : httpd.conf questions


stephenn
09-06-2002, 01:53 PM
Hi,

If I modified httpd.conf file, do i have to restart httpd daemon?


pls help on this


thanks

Mdot
09-06-2002, 02:05 PM
yes, /path/to/apache/apachectl restart

MarlboroMan
09-06-2002, 04:29 PM
killall -HUP httpd
Less typing. Won't work if you just installed an SSL cert, tho. :)

shann
09-07-2002, 01:04 AM
How long normally take restart.

Thanks
shan

x222943
09-07-2002, 01:23 AM
Originally posted by Miha
yes, /path/to/apache/apachectl restart


actually... i think its /mypath/to/apache/bin/apachectl restart isnt it?

and it shouldnt take more than a couple seconds for it to restart... should just do...


[user@host host] # /mypath/to/apache/bin/apachectl restart
[user@host host] #

that, and if there are no errors, it has been restarted without a problem...

MotleyFool
09-07-2002, 06:04 AM
hey bud hold on,

when he says /path/to/blah/blah

he means something like

/usr/local/apache/bin/apachectl

MotleyFool
09-07-2002, 06:06 AM
httpd will restart before you can say wtf!

apachectl is preferable to kill -HUP httpd because apachectl graceful does a syntax check of httpd.conf [apachectl configtest] and then starts

hostchamp
09-09-2002, 07:53 AM
Is there anyway to restart apache without causing disruption to visitors for even 2 seconds?

For instance i have entered a new virtualhost block and then i do a httpd restart, is there any better alternative to this so that services for existing visitors are not disrupted while the current configuration is reloadeD?

2host.com
09-09-2002, 08:05 AM
Originally posted by hostchamp
Is there anyway to restart apache without causing disruption to visitors for even 2 seconds?

For instance i have entered a new virtualhost block and then i do a httpd restart, is there any better alternative to this so that services for existing visitors are not disrupted while the current configuration is reloadeD?


/usr/local/apache/bin/apachectl stop;
/usr/local/apache/bin/apachectl startssl

(Or start in place of startssl, but if you aren't using SSL, you can just resgart or graceful.)

kill -HUP, or whatever.

Graceful would be best if it would work with SSL, because it will keep the current sessions connecting. I'd not worry about it other than that. Run configtest first to make sure things are okay so you don't have to have it down for those few seconds while you re-edit the file to fix a typo or something.

goodness0001
09-09-2002, 04:56 PM
Dont worry about the 2 seconds nobody will notice.

2host.com
09-09-2002, 04:59 PM
Originally posted by goodness0001
Dont worry about the 2 seconds nobody will notice.

Unless they are downloading a large-ish file from the web site via http. But, what can you do.

Acronym BOY
09-09-2002, 05:19 PM
Originally posted by 2host.com
Unless they are downloading a large-ish file from the web site via http. But, what can you do.

Blame your upstream! (Isnt that what everyone does?)

2host.com
09-09-2002, 05:24 PM
Originally posted by Acronym BOY


Blame your upstream! (Isnt that what everyone does?)

I guess I'm out of the loop. lol Besides, wouldn't it be the policy to blame their ISP and keep the blame far away from anything related to _your_ service? I think we're really on to something! lol

Acronym BOY
09-09-2002, 05:27 PM
Always blame their ISP. And when they call the brother across the country and he gets the same results, than you say its your upstream! :stickout

2host.com
09-09-2002, 05:34 PM
If worse and they show the upstream looks fine, you can always just say "Your web site has overloaded the server. WHAT DID YOU DO!?". lol

Acronym BOY
09-09-2002, 05:35 PM
Tell them the taliban hacked their website and now the server is being carted away by the FBI for further examination by the NSA and will be back within 9 months.

hostchamp
09-10-2002, 06:19 AM
What is the differrence between the following three ways of restarting apache;

1) apachectl stop
apachectl start

2) httpd restart

3) killall -HUP httpd

al3xchie
09-11-2002, 11:16 AM
just simple /etc/rc.d/init.d/httpd restart

MattMans
09-11-2002, 12:26 PM
You can reload Apache without killing off current connections using /etc/rc.d/init.d/httpd reload

That's the Redhat command, not sure is it's the same for other dists.

Matt

hostchamp
09-11-2002, 02:22 PM
there is no such command as;
/etc/rc.d/init.d/httpd reload

you can suffix httpd with following;{start|stop|restart|condrestart|status|fullstatus|graceful|help|configtest}

What does the following do;
/etc/rc.d/init.d/httpd graceful

MattMans
09-12-2002, 12:25 PM
There is on my Redhat 7.1 box:

[root@ns matt]# /etc/rc.d/init.d/httpd
Usage: /etc/rc.d/init.d/httpd {start|stop|restart|reload|condrestart|status}

hostchamp
09-12-2002, 01:32 PM
our apache versions would differn then, what ur apache ver.?