CariNet Forums  
Go Back   CariNet Forums > Control Panels

Reply
 
Thread Tools Search this Thread Display Modes
Old 05-12-2008, 04:46 PM   #1 (permalink)
Junior Member
 
Join Date: May 2008
Location: Italy (Sardinia Island)
Posts: 3
Send a message via MSN to srgeneral Send a message via Yahoo to srgeneral Send a message via Skype™ to srgeneral
Default Add a mod_suphp in your linux + plesk server

I use in this time a Linux Fedora Core and Plesk 8.4 and i add a mod_suphp on my linux servers.

For use a mod_suphp in your server read this how to step by spep.

1) Install a SuPHP Module with YUM

yum install mod_suphp

2) Edit your configuration files for active a mod_suphp. The file are 3

- /etc/httpd/conf.d/php.conf
- /etc/httpd/conf.d/mod_suphp.conf
- /etc/suphp.conf

In the file /etc/httpd/conf.d/php.conf clean your file and insert this config

Code:
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_module modules/libphp5.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps
In the file /etc/httpd/conf.d/mod_suphp.conf clean your file and insert this config

Code:
# 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/mod_suphp.so


### Uncomment to activate mod_suphp
suPHP_AddHandler php5-script
#AddHandler x-httpd-php .php

# 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


# 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 resists 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
In your /etc/suphp.conf clean and insert this configuration

Code:
[global]
;Path to logfile
logfile=/var/log/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=apache

;Path all scripts have to be in
docroot=/

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false

;Send minor error messages to browser
errors_to_browser=true

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
;umask=0077
umask=0022

; Minimum UID
min_uid=0

; Minimum GID
min_gid=0

; Use correct permissions for mod_userdir sites
handle_userdir=true

[handlers]
;Handler for php-scripts
php5-script=php:/usr/bin/php-cgi

;Handler for CGI-scripts
x-suphp-cgi=execute:!self
Okay the mod_suphp is config to work, but in this moment you have a some problem why your webmail (HORDE) not work on suPHP mode. For solve this problem you cant add a new config file in the /etc/httpd/conf.d i have create a suphpexclude.conf and into file inser the virtual host of your webmail and in the configuration insert this suPHP_Engine Off

<VirtualHost \
xxx.xxx.xxx.xxx:80 \
xxx.xxx.xxx.xxx:80 \
xxx.xxx.xxx.xxx:80 \
xxx.xxx.xxx.xxx:80 \
>
DocumentRoot /usr/share/psa-horde/
Alias /horde/ /usr/share/psa-horde/
Alias /imp/ /usr/share/psa-horde/imp/
ServerName webmail
ServerAlias webmail.*
UseCanonicalName Off
suPHP_Engine Off
<Directory /usr/share/psa-horde>
__________________
Marco Saiu
SR General CEO
m.saiu@srgeneral.com
srgeneral is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Share on FacebookStumble this Post!Google Bookmark this Post!Bookmark to Slashdot!
Reply With Quote
Reply

Tags
fedora core, mod_suphp, plesk

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT -7. The time now is 06:14 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0