note 92805 deleted from install.unix.apache2 by danbrown
| From: | danbrown@php.net | Date: | Mon, 10 Aug 2009 15:14:28 +0000 |
| Subject: | note 92805 deleted from install.unix.apache2 by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-159267@lists.php.net to get a copy of this message | ||
Note Submitter: nmmm at nmmm dot nu
----
Another interesting point with Apache 2.2 is following.
Let suppose we installed PHP as module. But for some directory, we need to use PHP as CGI (probably
because of custom configuration). This can be done using:
<FilesMatch "\.(php*|phtm|phtml|asp|aspx)$">
SetHandler none
</FilesMatch>
AddType application/x-httpd-php-custom .php
Action application/x-httpd-php-custom /cgi-bin/php-huge
Note type must be different than "application/x-httpd-php" and also you need to deactivate
the handler on sertain extention. You can do mixed configuration:
<FilesMatch "\.(php)$">
SetHandler none
</FilesMatch>
AddType application/x-httpd-php-custom .php
Action application/x-httpd-php-custom /cgi-bin/php-huge
in such case files like *.php5 and so on will be parsed via module, but *.php will go to php-huge
executable.