Providing practical examples since 1998

Things look quiet here. But I've been doing a lot of blogging at
dan.langille.org because I prefer WordPress now.
Not all my posts there are FreeBSD related.
I am in the midst of migrating The FreeBSD Diary over to WordPress
(and you can read about that here).
Once the migration is completed, I'll move the FreeBSD posts into the
new FreeBSD Diary website.

I was playing around with virtual
websites, and I was stopping and starting httpd quite a lot.
Unfortunately, I was not stopping it correctly.

The correct way to stop httpd is by issuing the following command:

./apachectl start

To stop httpd, issue the following command:

./apachectl stop

For my system, the above files are located at /usr/local/sbin.

The above process allows active sessions to terminate normally. If you do a kill
or a killall, you are defeating that process.

Restarting Apache

You should not do a HUP on apache to restart it. Nor should you do a killall
-HUP. See http://httpd.apache.org/docs/stopping.html
for details. If you don't use the following approach, you risk disconnection of
existing clients and missed log file entries.

If you are restarting Apache (i.e. you
have modified httpd.conf and want to invoke the changes), you should do this: