Although it is not recommended, I frequently need to configure suPHP and
mod_php on the same server: People want PHP scripts in their
"userdir" (/home/*/public_html) to be run with their user id, but we
still need PHP applications in /var/www to be owned by root and run with
the Apache user id.

In this case, my goal is to run every script on the server with suPHP,
but make an exception for /var/www, where I want to use mod_php.

My first challenge was that, when both suPHP and mod_php are enabled,
and they are both set to handle the application/x-httpd-php type,
mod_php takes precedence (in my experience?)

To overcome this, I use "php_flag engine off", like so:

<IfModule mod_php5.c>
  AddType application/x-httpd-php .php .phtml .php3
  AddType application/x-httpd-php-source .phps

  php_flag engine off
  <Directory /var/www>
    php_flag engine on
  </Directory>

</IfModule>

This disables mod_php for all directories, which means suPHP gets used,
and then enables mod_php for just /var/www.

Would you consider adding this documentation to section "4. Additional
information" in:
https://ssl.marsching.biz/subversion/suphp/trunk/doc/apache/INSTALL

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
suPHP mailing list
suPHP@lists.marsching.biz
http://lists.marsching.com/mailman/listinfo/suphp

Reply via email to