Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 16th March 2010, 21:06
lifeisboost lifeisboost is offline
Senior Member
 
Join Date: Feb 2006
Posts: 122
Thanks: 0
Thanked 2 Times in 2 Posts
Default suPHP on Fedora 9

I have been trying to install suPHP on an existing ISP config server with no luck. I followed the information here

http://www.howtoforge.com/install-su...2.20-and-above

but install version 7.2. This is an existing ISPconfig server with luckily not that many clients on it. After the install i added

suPHP_Engine on
suPHP_UserGroup web9_admin web9
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php


to the vhost. I removed all incompatible directives and got Apache to restart. but when i view this site in my browser it wants to download the PHP file instead of executing it. I have tried changing the web root folder permissions but this did not help. any one have any ideas?

Last edited by lifeisboost; 17th March 2010 at 08:13.
Reply With Quote
Sponsored Links
  #2  
Old 17th March 2010, 08:22
lifeisboost lifeisboost is offline
Senior Member
 
Join Date: Feb 2006
Posts: 122
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Working on this some more this is now showing in the logs of the site trying to view a html file. I get a 500 in my browser and this in the log

SoftException in Application.cpp:555: Directory /home is not owned by web9_admin


/etc/suphp.conf

PHP 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
=/home/www

;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
=true

;Send minor error messages to browser
errors_to_browser
=false

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

;Umask to setspecify in octal notation
umask
=0077

Minimum UID
min_uid
=100

Minimum GID
min_gid
=100

[handlers]
;
Handler for php-scripts
x
-httpd-php=php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper

;Handler for CGI-scripts
x
-suphp-cgi=execute:!self 
Reply With Quote
  #3  
Old 17th March 2010, 08:24
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,504
Thanks: 813
Thanked 5,265 Times in 4,129 Posts
Default

Do not add the directives that you posted above manually, this is all configured by ispconfig and it may not work if you do this manually. Instead, enable suphp in the config.inc.php file as described in the tutorial and then edit a setting of one of your sites, e.g. quota and save the site, so that ispconfig rewrites the Vhosts_ispconfig.conf file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 17th March 2010, 08:25
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,504
Thanks: 813
Thanked 5,265 Times in 4,129 Posts
Default

Quote:
Originally Posted by lifeisboost View Post
Working on this some more this is now showing in the logs of the site trying to view a html file. I get a 500 in my browser and this in the log

SoftException in Application.cpp:555: Directory /home is not owned by web9_admin
For suphp, all directories and files in the "web" directory of a site have to be owned by the owner of the website.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 17th March 2010, 08:30
lifeisboost lifeisboost is offline
Senior Member
 
Join Date: Feb 2006
Posts: 122
Thanks: 0
Thanked 2 Times in 2 Posts
Default

why does it show it as /home though in the error? i woudl figure it would be reporting /home/www/web9


[CODE]
Quote:
Originally Posted by till View Post
For suphp, all directories and files in the "web" directory of a site have to be owned by the owner of the website.
Why is it just showing as the base site being in /home though?

Code:
drwxrwxr-x  10 web9_admin web9  4096 2010-03-16 15:03 .
drwxr-xr-x 169 root      root  20480 2010-03-16 11:04 ..
drwxr-xr-x   2 web9_admin web9  4096 2010-03-17 02:13 backup
drwxrwxr-x   2 web9_admin web9  4096 2008-07-09 12:54 cgi-bin
-rw-------   1 web9_admin web9    24 2010-03-16 15:03 .forward
drwxrwxr-x   3 web9_admin web9  4096 2009-07-21 15:37 ftp
-rw-rw-r--   1 root      web9   579 2010-03-16 04:50 .htpasswd
drwxr-xr-x   3 web9_admin web9  4096 2010-03-17 01:56 log
lrwxrwxrwx   1 root      root     38 2010-03-16 15:03 Maildir -> /home/www/web9/user/web9_admin/Maildir
drwxrwxrwx   2 web9_admin web9  4096 2008-07-09 12:54 phptmp
-rw-r--r--   1 root      root    464 2010-03-16 15:03 .procmailrc
lrwxrwxrwx   1 root      root     45 2010-03-16 15:03 .spamassassin -> /home/www/web9/user/web9_admin/.spamassassin/
drwxr-xr-x   2 web9_admin web9  4096 2008-07-09 12:54 ssl
drwxr-xr-x  23 web9_admin web9  4096 2010-02-24 23:59 user
lrwxrwxrwx   1 root      root     46 2010-03-16 15:03 .vacation.cache -> /home/www/web9/user/web9_admin/.vacation.cache
drwxrwxr-x  12 web9_admin web9  4096 2010-03-17 02:22 web
Reply With Quote
  #6  
Old 17th March 2010, 08:36
lifeisboost lifeisboost is offline
Senior Member
 
Join Date: Feb 2006
Posts: 122
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I did as you said and had ispconfig write in the lines to the vhost but still the same behavior and error
Reply With Quote
  #7  
Old 17th March 2010, 09:38
lifeisboost lifeisboost is offline
Senior Member
 
Join Date: Feb 2006
Posts: 122
Thanks: 0
Thanked 2 Times in 2 Posts
Default

got a little further, now i have a new error

Code:
[Wed Mar 17 04:35:17 2010] [error] [client ] Premature end of script headers: websites.php
[Wed Mar 17 04:35:17 2010] [error] [client ] SecurityException in Application.cpp:496: Handler not found in configuration
[Wed Mar 17 04:35:17 2010] [error] [client ] Caused by KeyNotFoundException in Configuration.cpp:234: Handler "application/x-httpd-php" not found
Reply With Quote
  #8  
Old 17th March 2010, 10:33
lifeisboost lifeisboost is offline
Senior Member
 
Join Date: Feb 2006
Posts: 122
Thanks: 0
Thanked 2 Times in 2 Posts
Default

okay, now i am at to where .html pages download and php pages download with a cryptic file name with a .part on the end of it
Reply With Quote
  #9  
Old 18th March 2010, 14:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

What's in /etc/suphp.conf?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #10  
Old 21st March 2010, 07:23
lifeisboost lifeisboost is offline
Senior Member
 
Join Date: Feb 2006
Posts: 122
Thanks: 0
Thanked 2 Times in 2 Posts
 
Default

Quote:
Originally Posted by falko View Post
What's in /etc/suphp.conf?
Code:
[global]
;Path to logfile
logfile=/var/log/suphp.log

;Loglevel
loglevel=warn

;User Apache is running as
webserver_user=apache

;Path all scripts have to be in
docroot=/home/www

;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=true

;Send minor error messages to browser
errors_to_browser=false

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

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

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100

[handlers]
;Handler for php-scripts
x-httpd-php='php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper'

;Handler for CGI-scripts
x-suphp-cgi='execute:!self'

I have tried the last 2 lines without the ' 'also. i have even tried docroot with just /
Reply With Quote
Reply

Bookmarks

Thread Tools
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Networking two desktop fedora into LAN perfectpol7 Technical 1 27th February 2009 14:04
How To Set Up suPHP With PHP4 And PHP5 for fedora rvakili Installation/Configuration 5 7th January 2009 12:48
Upgrade from Fedora 8 to Fedora 9 CarloZ Installation/Configuration 2 12th June 2008 10:07
Goal: user separation (but apache can't read what suPHP wrote) berny Installation/Configuration 1 26th April 2008 18:22
How can you correct an incompatible kernel on a Fedora installation CD? gnagent Kernel Questions 2 17th March 2007 20:47


All times are GMT +2. The time now is 10:35.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.