This section explains how to edit the main "httpd.conf" file which is used to control the Apache HTTPd server software.
Note: You will need a text editor. On Unix there are many choices (e.g., vi, emacs, mc, etc.), and everyone has their favourite that best suits their needs. On Windows and ReactOS, there are generally two options; a DOS utility called "Edit" or a GUI-based program called "Notepad." IMPORTANT: Do NOT use a word processor or else your configuration file may be unreadable by the Apache HTTPd server software!
§ Editing httpd.conf
Locate your "httpd.conf" file (the master Apache HTTPd server configuration file), and open it with your text editor.
Attention Windows/ReactOS users -- you will probably need the following information because it is not included in the default configuration:
Various add-ons such as software firewalls, real-time virus scanners, etc., can easily interfere with the advanced functionality that the Apache HTTPd server uses to enhance and optimize web server performance. If you encounter corrupted or incomplete file downloads, unexplainable error messages, etc., then placing the following directives in your "httpd.conf" file (preferrably somewhere near the beginning/top of the configuration file -- including some preceding comments along the lines of "Ensure reliable operation in Windows/ReactOS" is also highly recommended):
Starting and stopping Apache HTTPd server varies on each platform. In BSD/Unix/Linux environments the RC system is typically used although using the "apachectl" command should also work. On Windows/ReactOS, an icon in the System Tray portraying the famous Apache logo depicting a feather, partly obscured by a white status circle at the bottom-right corner, provides different ways to stop or start Apache HTTPd depending on if you left-click or right-click it with your mouse.
Note: It's important to be familiar with the process of stopping and starting Apache HTTPd, as well as knowing where to find the log files.
§ Apache modules
Certain modules that are normally included with the Apache HTTPd server installation (and many are compiled in directly), but are disabled by default (because they provide more advanced functionality that aren't needed in most environments) which will need to be enabled. A few of the modules are also optional, but we will explain why they are useful.
From the beginning of httpd.conf, search for the "LoadModule" directive to locate the list of modules. Lines that begin with an octothorpe ("#") are disabled since they are treated the same as comments (all comments are preceeded by octothorpes, and may optionally be indented by whitespace characters such as tabs or spaces).
After the last "LoadModule" entry, insert a blank line, followed by the directives outlined in the table below (we strongly recommend keeping the comments for future reference).
The "mod_perl.so" and "mod_apreq2.so" files listed below should have been copied to your Apache "modules" directory automatically. In some scenarios you may have to search your hard drive to find these files (this is beyond the scope of this guide as it is specific to each Operating System); for Windows users, the LoadFile directive may also need to be updated if you're using a newer version of Perl.
§ Perl modules
In our guide we will be using a few modules that are available via CPAN (or the PPM if you're using Windows/ReactOS). Knowing how to add more Perl modules is very important.
The following modules should already be installed because they are normally included with mod_perl2:
The Apache2::Reload module needs to be installed separately, and is particularly useful in non-production environments such as those used by developers. To install it, use the following command at the shell or command prompt:
If CPAN requires configuration, aside from selecting mirrors that are geographically close, the rest of the default settings will be fine.
The DateTime module is also very useful, and its installation is easy -- in all environments simply type the following command at the shell or command prompt:
If you need additional Perl modules, you can add them at any time and ModPerl will automatically have access to them.
Home | Contact us
Copyright © Inter-Corporate Computer & Network Services, Inc. All rights reserved.
All trademarks are the property of their respective owners.