Apache needs to be told to re-read its configuration file
before it will take account of changes, but it is not necessary
to completely stop and restart our web server after each change.
A rather faster mechanism is to cause it to reread its file to
note changes. This can be done by using the
reload
option on the startup script.
We are now running one web server supporting two web sites. However, if we request the index.html page from www.dept.cam.ac.uk then we get the source of the homepage and not the HTML rendering of it. We still have work to do.
Before we find out why, for completeness we should cover
the assorted options that can be passed to the startup script
beyond the start
, restart
and
reload
options we have met already.
Options to the startup script /etc/init.d/apache2
start
Starts the web server.
stop
Stops the web server.
restart
Stops and starts the web server.
try-restart
stop the web server and if this succeeds (i.e. if it was running before), start it again.
status
Indicates whether or not the web server is running.
full-server-status
Dump a full status screen; requires lynx or w3m
reload
or graceful
Causes a running web server to reread its configuration file(s) and to reopen its log files.
help
Not much help!
configtest
Does not launch a web sever but forces it to parse the configuration file for syntactic validity.