Differences between revisions 6 and 7
Revision 6 as of 2013-06-03 17:52:26
Size: 1874
Editor: gryzor
Comment:
Revision 7 as of 2013-06-03 19:48:45
Size: 1874
Editor: gryzor
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
This method is preferred above all other recipes, and is suitable for versions 2.4 and newer. Is also allows for a threaded mpm such as event or worker, which will significantly reduce the RAM requirements on your server. This method is preferred above all other recipes, and is suitable for versions 2.4 and newer. It also allows for a threaded mpm such as event or worker, which will significantly reduce the RAM requirements on your server.
Line 19: Line 19:
This method is suitable for versions 2.0 or 2.2. Is allows for a threaded mpm such as worker, which will significantly reduce the RAM requirements on your server. And mod_fcgid is an official Apache module. This method is suitable for versions 2.0 or 2.2. It allows for a threaded mpm such as worker, which will significantly reduce the RAM requirements on your server. And mod_fcgid is an official Apache module.

Running PHP on Apache httpd

The scope of this document is to enumerate all possible configuration scenarios to allow httpd to serve php content.

Using proxy_fcgi and php-fpm (for 2.4)

This method is preferred above all other recipes, and is suitable for versions 2.4 and newer. It also allows for a threaded mpm such as event or worker, which will significantly reduce the RAM requirements on your server.

Please see the following article

Using php with fastcgi (for 2.2 and older)

This method is suitable for versions 2.2 and older. It allows for a threaded mpm such as worker, which will significantly reduce the RAM requirements on your server.

Please see the following article

Using php with fcgid (for 2.2 and older)

This method is suitable for versions 2.0 or 2.2. It allows for a threaded mpm such as worker, which will significantly reduce the RAM requirements on your server. And mod_fcgid is an official Apache module.

Please see the following article

Using php as a DSO (deprecated)

This method is the oldest and slowest possible configuration. It is suitable for version 2.2 and older, and requires the use of the prefork mpm.

First, the module must be loaded:

  • LoadModule php5_module lib/httpd/modules/libphp5.so

Then, add the handler for the dso:

  • # Then, configure the handler for all files that end with .php
    # A regexp such as \.(php|php4|php5)$ can also be used to support more extensions
    <FilesMatch \.php$>
      SetHandler application/x-httpd-php
    </FilesMatch>

References:

Official php installation and configuration instructions

Common issues:

Why is my php file offered as a download with mod_php?

php (last edited 2013-06-03 19:48:45 by gryzor)