Chapter 5. Web Server Control, Monitoring, Upgrade, and Maintenance
This chapter covers everything about administering a running mod_perl server. First, we will explain techniques for starting, restarting, and shutting down the server. As with Perl, there’s more than one way to do it, and each technique has different implications for the server itself and the code it runs. A few widely used techniques for operating a server are presented. You may choose to use one of the suggested techniques or develop your own.
Later in the chapter, we give instructions on upgrading and disabling scripts on a live server, using a three-tier scheme, and monitoring and maintaining a web server.
Starting the Server in Multi-Process Mode
To start Apache manually, just run its executable. For example, on our machine, a mod_perl-enabled Apache executable is located at /home/httpd/httpd_perl/httpd_perl. So to start it, we simply execute:
panic% /home/httpd/httpd_perl/bin/httpd_perl
This executable accepts a number of optional arguments. To find out what they are (without starting the server), use the -h argument:
panic% /home/httpd/httpd_perl/bin/httpd_perl -h
The most interesting arguments will be covered in the following sections. Any other arguments will be introduced as needed.
Starting the Server in Single-Process Mode
When developing new code, it is often helpful to run the server in single-process mode. This is most often used to find bugs in code that seems to work fine when the server starts, but ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access