I’m really just asking this question out of curiosity. I recently got my first reseller account, and I notice that whenever I create a new account, I get the message “Restarting Apache.”
This seems weird to me, but it’s probably because I don’t even understand exactly what Apache is doing…I guess I assumed that a shared server had a single installation of Apache and that it could not be restarted without affecting everyone on the server.
On the gross assumption that the shared server is much like my test server, what your new account is doing is creating a new domain name on your server. That requires Apache’s VirtualHost data to be updated (httpd-vhosts.conf on a WinDoze box) which, in turn, requires a restart of Apache. Rather than a complete shut down then start, the restart is rather quick. Be assured, though, that your restart DOES affect everyone else on your shared server!
What you DON’T see happening is the updating of the DNS - which I do on my test server by merely updating the hosts file (C:\WinDoze\system32\drivers\etc/hosts{extensionless}) with 127.0.0.1 {LOCAL domain name to match the new httpd-vhosts.conf entry).
It’s nice that cPanel (and the other control panels) handle all this heavy lifting for you!
They’re probably using apachectl graceful to restart the server, rather than apachectl restart. As you can read in the man page of apachectl:
Gracefully restarts the Apache httpd daemon. If the daemon is not running, it is started. This differs from a normal restart in that currently open connections are not aborted.
In other words, since Apache doesn’t abort current connections, other users on your hosting server won’t know you’re restarting it and you’re not troubeling anyone.
…but then Scallio’s response seems to conflict, so I remain somewhat confused (not an unusual state for me).
I understand that it would be nice, if possible, to not affect others’ stuff, so I like Scallio’s answer, if it’s the right one.
On the other hand, I don’t really know how a restart would affect other accounts, let’s say if the ‘graceful’ were not appended. Like, how noticeable it would be, and how often new domains are created on a shared server?
In other words, how many accounts are on a shared server? I assume it varies widely from host to host, and that hosts are probably not generally forthcoming with this parameter. But I have no clue…would it be 20? Or 50? or 5000? If it helps at all, I am on the most basic reseller account with HostGator.
Okay, my response was based on my own test server (localhost) while ScallioXTX’s response was from Apache.org, i.e., the front end of the horse! If Apache says that a restart doesn’t affect others on the server, that’s the official word. Personally, I can’t imagine how they can restart it without impacting ongoing processes but I’m NOT going to argue with the guys who build and maintain the server!
Based on the “official word,” it would not be noticeable at all.
Your last question, though, is one for your host. I’m not sure about the number of shared accounts on a server but it would be quite a lot - I’d GUESS in the 50 range but that IS a guess and your host is the “front end of the horse” on that question (as far as you’re concerned). If you find out from Hostgator, please post here as that question is of mild interest - but don’t be surprised if they consider that to be proprietary (business) information.
Actually, they don’t say that. There are two different ways of restarting Apache:
(1) A real restart using apachectl restart, which does affect other users
(2) Reread config files but keep on running like nothing is going on using apachectl graceful, which does not affect other users
So if other user users are affected by you adding a domain depends on whether GoDaddy uses the first of the second option. They probably use the second option, but I’m not sure