Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Closed Thread
 
Thread Tools Display Modes
  #1  
Old 4th March 2007, 21:45
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default Setting up suphp on an ISPConfig server

For security reasons and to avoid problems with permissions, i would like to setup suphp on my Debian ISPConfig server.

I have read http://www.howtoforge.com/apache2_suphp_php4_php5 with interest and i would like to know if it is compatible with my Debian ISPConfig server,
which has been setup according Falko's howto at http://www.howtoforge.com/perfect_setup_debian_sarge.

I think it is enough to setup suphp for php4 only, as i do not use php5 for my Apache2.

One more question:
If i want to use suphp, is it necesarry to add the following lines manually (on the shell) to the virtualhost file?

suPHP_Engine on
suPHP_UserGroup testuser test
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php

Or can it be done within ISPConfig via the Apache directives field or so?
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005

Last edited by Hans; 4th March 2007 at 22:35.
Sponsored Links
  #2  
Old 5th March 2007, 18:36
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

Quote:
Originally Posted by Hans
I have read http://www.howtoforge.com/apache2_suphp_php4_php5 with interest and i would like to know if it is compatible with my Debian ISPConfig server
I think so.

Quote:
Originally Posted by Hans

suPHP_Engine on
suPHP_UserGroup testuser test
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php

Or can it be done within ISPConfig via the Apache directives field or so?
I'd place it in the Apache Directives field.
__________________
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:
  #3  
Old 6th March 2007, 11:10
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default ISPConfig and suphp

Falko/Till,

Because i am very careful, i have a question about ISPConfig and suphp:

Within the thread http://www.howtoforge.com/forums/sho...ighlight=suphp is mentioned that it is necessary to change the file /home/admispconfig/ispconfig/lib/config.inc.php, which is part of ISPConfig. If that’s correct I will have problems, everytime I update ISPConfig to the next version.
Is this the only way, how suphp can be setup on an ISPConfig server or is there another option?
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005

Last edited by Hans; 6th March 2007 at 21:07.
  #4  
Old 6th March 2007, 23:43
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default suphp works great with ISPConfig

In the mean time, i've setup suphp on my Debian Sarge test-server successfully.
I want you to know that suphp works great with ISPConfig!

My next step is to do this also for my 2 production servers.
This means that i need a close look to my vhost, because of the amount of existing sites.
(The suphp directives for Apache are only added automaticly for new sites).
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
  #5  
Old 7th March 2007, 18:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

Quote:
Originally Posted by Hans
If that’s correct I will have problems, everytime I update ISPConfig to the next version.
The updater takes care of your settings in config.inc.php, so that should be no problem.
__________________
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:
  #6  
Old 7th March 2007, 18:45
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

That's really nice Falko.

ISPConfig is really great!
I love it.

The subject "suphp" is here and everywhere in the forums.
Of course we have your howto, which is a great guide, but some details are a little bit different, if you like to run it on an ISPConfig server.

For that reason and with your permission of course, i will write a small howto which explains how i did it. It will be based on your howto and the info which can be found within the forums on Howtoforge.
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005

Last edited by Hans; 7th March 2007 at 19:01.
  #7  
Old 7th March 2007, 19:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

Quote:
Originally Posted by Hans
For that reason and with your permission of course, i will write a small howto which explains how i did it. It will be based on your howto and the info which can be found within the forums on Howtoforge.
That would be great!
__________________
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:
  #8  
Old 8th March 2007, 09:33
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default From php4mod to php4-cgi+suphp

Dear Till/Falko,
Although, i've setup suphp successfully on my test-server with ISPConfig,i've some questions:

After installing suphp:
The webfolders are created with chmod 775 and not 755.
The php-scripts have chmod 664 in stead of 644.

For this reason, some php-script do not function in the beginning.
They only work if the permissions are correct (of course).

What can i do to set the permissions in 755 & 644 from the beginning?
I guess, it has something to do with the permissions settings within /etc/suphp.conf, which are as follows:

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

After i installed suphp, I also did a test with an existing Joomla site.
Then a problem occur, because of an internal server 500 error.
I guess it has something to do with the permissions too, because suphp and php4-cgi are up and running.

What can you recommend to volve this Internal server error 500?

When i am finished with testing i have the plan to do an migration from php4 as a module to php4-cgi+suphp.
Before i take such a step, i need to know how to solve the problems as described above.
So your advise is appreciated.
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
  #9  
Old 8th March 2007, 18:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

What does your /etc/suphp.conf look like now?

If you want to change parmissions, you'd have to modify the function make_docroot() in /root/ispconfig/scripts/lib/config.lib.php.
__________________
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:
  #10  
Old 8th March 2007, 23:11
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
 
Default

Hi Falko,

I will have a look at the line:
make_docroot() in /root/ispconfig/scripts/lib/config.lib.php and i will report about my experience with it.

I think it is very important to set the right permissions, otherwise there will be a lot of problems on a server with a lot of (CMS)-websites, which make use of php.

The contents of /etc/suphp.conf on my test-server looks like this:

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

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=www-data

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

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100


[handlers]
;Handler for php-scripts
x-httpd-php=php:/usr/bin/php4-cgi

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

BB-Hosting | Quality Web Hosting since 2005
Closed Thread

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
php Apps email not going through palkat General 8 21st September 2011 05:35
ISPConfig running on default web server (port 80) geek.de.nz Installation/Configuration 3 31st March 2008 10:32
Running ISPConfig without the mail server piers Installation/Configuration 5 6th June 2007 16:31
Setting up a backup mail server setup with two installations of ISPConfig zitch Tips/Tricks/Mods 7 30th December 2006 10:07
Web server and Mail server on 2 ispconfig adrenalinic Installation/Configuration 1 3rd September 2006 17:55


All times are GMT +2. The time now is 21:04.


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