mod_php and suphp at same time


; Security options
;Check wheter script is within DOCUMENT_ROOT
;Send minor error messages to browser
;Handler for php-scripts
;Handler for CGI-scripts


# This is the Apache server configuration file providing suPHP support.
# It contains the configuration directives to instruct the server how to
# serve php pages while switching to the user context before rendering.
LoadModule suphp_module modules/
# This option tells mod_suphp if a PHP-script requested on this server (or
# VirtualHost) should be run with the PHP-interpreter or returned to the
# browser "as it is".
#suPHP_Engine on
# Disable php when suphp is used, to avoid having both.
#<IfModule mod_php5.c>
#php_admin_flag engine off
#<IfModule mod_php4.c>
#php_admin_flag engine off
# To use suPHP to parse PHP-Files
#AddHandler x-httpd-php .php
#AddHandler x-httpd-php .php .php4 .php3 .phtml
# This option tells mod_suphp which path to pass on to the PHP-interpreter
# (by setting the PHPRC environment variable).
# Do *NOT* refer to a file but to the directory the file resides in.
# E.g.: If you want to use "/path/to/server/config/php.ini", use "suPHP_Config
# /path/to/server/config".
# If you don’t use this option, PHP will use its compiled in default path.
# suPHP_ConfigPath /etc
# If you compiled suphp with setid-mode "force" or "paranoid", you can
# specify the user- and groupname to run PHP-scripts with.
# Example: suPHP_UserGroup foouser bargroup
# suPHP_UserGroup apache apache
# This option tells mod_suphp to handle requests with the type <mime-type>.
# Please note this only works, if an action for the handler is specified
# in the suPHP configuration file.
#suPHP_AddHandler x-httpd-php
# This option tells mod_suphp to NOT handle requests with the type <mime-type>.
# suPHP_RemoveHandler <mime-type>

Usege example

SuexecUserGroup "#500" "#500"
DocumentRoot /home/
suPHP_Engine on
AddHandler x-httpd-php .php
AddHandler x-httpd-php .php .php4 .php3 .phtml
suPHP_AddHandler x-httpd-php
<Directory /home/>
allow from all
DirectoryIndex index.htm index.html index.php

4 Replies to “mod_php and suphp at same time”

  1. Hi there would you mind letting me know which webhost you’re using? I’ve loaded your blog in 3 completely different browsers and I must say
    this blog loads a lot faster then most. Can you suggest a good web hosting provider at a fair price?
    Kudos, I appreciate it!

  2. Have you ever considered about including a little bit more than just your articles?
    I mean, what you say is fundamental and everything. Nevertheless
    just imagine if you added some great images or videos to
    give your posts more, “pop”! Your content is excellent but with pics and videos, this blog could certainly be one
    of the most beneficial in its niche. Terrific

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.