Working with the Apache configuration file
If you want to install Passenger in its Apache integration mode then you will reach a point where you have to edit Apache the configuration file. This page provides information for those who are not familiar with how the Apache configuration file and its related directories are organized.
The location of the Apache configuration file
On most systems if you installed Apache with a package manager, or it came preinstalled, the Apache configuration file is located in one of these locations:
If you installed Apache from source it is likely located in
/opt, though the config files may have been moved to
/etc as usual. Check your build script for more details.
Furthermore On OS X Server >= 10.8 Mountain Lion, the location of the Apache configuration file varies. Some paths are listed below, please refer to the OS X Server documentation for complete information.
|Not using websites/webservices||default (/etc/apache2/httpd.conf)|
|OS X Server 4 webservices||/Library/Server/Web/Config/apache2/httpd_server_app.conf|
|OS X Server 5 websites||/Library/Server/Web/Config/apache2/server-httpd.conf|
mods-enabled and sites-enabled
To allow better organization, many operating systems and Apache distributions also read configuration files in the
mods-enabled contains symlinks to files in
mods-available. This latter subdirectory contains config files for all available modules, while
mods-enabled contains only a subset, namely the modules that should actually be enabled. The symlinks are created using the
*.load files contain
LoadModule directives, while
*.conf files contain all other configuration directives.
Storing Passenger configuration snippets
If you can, you should use
mods-available to store Passenger configuration. Assuming that your Apache configuration directory is
/etc/apache2/mods-available/passenger.loadand paste the
LoadModule ...directive that
/etc/apache2/mods-available/passenger.confand paste the
PassengerRootand other Passenger options.
- Enable by running
sudo a2enmod passenger.
mods-enabled mechanism is not available then you can paste configuration snippets into