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 18th August 2007, 19:05
zetnsh zetnsh is offline
Senior Member
 
Join Date: Aug 2007
Posts: 111
Thanks: 8
Thanked 5 Times in 5 Posts
Default fc6 + ISPConfig + suphp

Hi guys,

I've managed to get ISPConfig working, all but the suphp part! I enabled this by editing the appropriate line of /home/admispconfig/ispconfig/lib/config.inc.php as follows:

Code:
$go_info["server"]["apache2_php"] = 'suphp';
Incidentally, I tested my suphp setup and it worked fine before the ISPConfig install.

I've looked at the instructions on http://www.howtoforge.com/suphp_debian_ispconfig which doesn't quite apply because I'm on Fedora Core 6, and it's very helpful. However, something wierd is happening when I create a new virtual host.

If I create a new php-enabled virtual host I end up with a Vhosts_ispconfig.conf_????? file which contains references to suphp, but the actuall Vhosts_ispconfig.conf file which is linked from httpd.conf doesn't contain reference to the vhosts file with the date stamp.

Not quite sure where to go from here - the only thing I could think of is that I needed to compile mod_suphp manually with the couple of changed lines mentioned in the debian howto - I just did

Code:
yum install mod_suphp
Any ideas?

Thanks,

Neil Hamilton
Web Outreach
Reply With Quote
Sponsored Links
  #2  
Old 19th August 2007, 00:42
ceesco53 ceesco53 is offline
Junior Member
 
Join Date: Aug 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default RE: SuPHP on CentOS 5 same problem

Quote:
If I create a new php-enabled virtual host I end up with a Vhosts_ispconfig.conf_????? file which contains references to suphp, but the actuall Vhosts_ispconfig.conf file which is linked from httpd.conf doesn't contain reference to the vhosts file with the date stamp.
I'm using centos 5 and recompiled the suphp rpm. I'm getting the same problem. A config with a timestamp with proper suphp references in the virtualhosts, but the actual vhost config file remains using the old php settings. Logically there must be something else that needs to be changed, but what? Im using Ispconfig 2.2.15 with remoting enabled just fine otherwise.
Reply With Quote
  #3  
Old 19th August 2007, 14:35
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,624
Thanks: 793
Thanked 4,994 Times in 3,909 Posts
Default

Please have a look here:

http://www.howtoforge.com/forums/sho...=date+appended
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 19th August 2007, 14:37
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,624
Thanks: 793
Thanked 4,994 Times in 3,909 Posts
Default

Quote:
Originally Posted by zetnsh
Hi guys,

I've managed to get ISPConfig working, all but the suphp part! I enabled this by editing the appropriate line of /home/admispconfig/ispconfig/lib/config.inc.php as follows:

Code:
$go_info["server"]["apache2_php"] = 'suphp';
Incidentally, I tested my suphp setup and it worked fine before the ISPConfig install.

I've looked at the instructions on http://www.howtoforge.com/suphp_debian_ispconfig which doesn't quite apply because I'm on Fedora Core 6, and it's very helpful. However, something wierd is happening when I create a new virtual host.

If I create a new php-enabled virtual host I end up with a Vhosts_ispconfig.conf_????? file which contains references to suphp, but the actuall Vhosts_ispconfig.conf file which is linked from httpd.conf doesn't contain reference to the vhosts file with the date stamp.

Not quite sure where to go from here - the only thing I could think of is that I needed to compile mod_suphp manually with the couple of changed lines mentioned in the debian howto - I just did

Code:
yum install mod_suphp
Any ideas?

Thanks,

Neil Hamilton
Web Outreach
The mod_suphp that v´can be isntalled with yum is not compatible with ISPConfig. You will have to compile a new suphp binary with the changes mentioned in the debian howto. There will be a howto published for compiling suphp for fedora + centos and ispconfig next week.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 20th August 2007, 18:47
zetnsh zetnsh is offline
Senior Member
 
Join Date: Aug 2007
Posts: 111
Thanks: 8
Thanked 5 Times in 5 Posts
Default

Thanks Tim,

Now httpd -t gives:

Code:
Syntax error on line 33 of /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf:
Invalid command 'suPHP_UserGroup', perhaps misspelled or defined by a module not included in the server configuration
Which I guess would be sorted by recompiling suphp from the sources. I'll have a look at the Debian-based solution and see how I get on!

Neil
Reply With Quote
  #6  
Old 21st August 2007, 07:57
zetnsh zetnsh is offline
Senior Member
 
Join Date: Aug 2007
Posts: 111
Thanks: 8
Thanked 5 Times in 5 Posts
Default An update: nearly there!

Right - very nearly got it, just one last problem


Having unpacked the suphp-0.6.2 source to /root, this is what I did to install suphp:

Code:
cd /root/suphp-0.6.2
As per the debian howto, I replaced the lines 324/325 with these two lines below:

Code:
AP_INIT_ITERATE("suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, RSRC_CONF | ACCESS_CONF, "Tells mod_suphp to handle these MIME-types"),

AP_INIT_ITERATE("suPHP_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, RSRC_CONF | ACCESS_CONF, "Tells mod_suphp not to handle these MIME-types"),
I then encountered a problem building suphp - It kept complaining about various LIBTOOL errors. So - I then edited the file configure.ac and added the following line:

Code:
AC_PROG_LIBTOOL
Then I ran:

Code:
aclocal
autoconf
./configure --prefix=/var --sysconfdir=/etc --with-apache-user=apache --with-setid-mode=paranoid --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-1-config
make
make install
I then made a copy of the template config file:

Code:
cp /root/suphp-0.6.2/doc/suphp.conf-example /etc/suphp.conf
And changed a few settings, so the file was as follows:

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

;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

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100


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

;Handler for CGI-scripts
x-suphp-cgi=execute:!self
I have to say this nearly worked - after making a change to one of the vhosts, the suPHP declarations were back in /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf which was nice.

The trouble is, I'm now getting internal server error when trying to run a script, the error being "premature end of script headers" and I can't see how to debug that at the moment!

If someone else has the answer, let me know, otherwise if I find it, I'll post here!
Reply With Quote
  #7  
Old 21st August 2007, 17:13
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by zetnsh
The trouble is, I'm now getting internal server error when trying to run a script, the error being "premature end of script headers" and I can't see how to debug that at the moment!
Any errors in Apache's error log?
__________________
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
The Following User Says Thank You to falko For This Useful Post:
zetnsh (21st August 2007)
  #8  
Old 21st August 2007, 17:18
zetnsh zetnsh is offline
Senior Member
 
Join Date: Aug 2007
Posts: 111
Thanks: 8
Thanked 5 Times in 5 Posts
Default

Nothing very informative I'm afraid Just this:

Code:
[Tue Aug 21 16:15:46 2007] [error] [client 88.97.179.134] Premature end of script headers: test.php
If I knew what random error message was being output before the headers, that would be a start!

FYI, the script simply contains this:

Code:
<?php
print "TESTING FILE WRITE:<br>\n";
unlink("/tmp/test.txt");
$handle = fopen("/tmp/test.txt","a");
print ($handle);
fwrite($handle,"TESTING");
fclose($handle);
print "RESULT:<pre>\n";
system("ls -al /tmp/test.txt");
print "</pre>\n";
print "This should be owned: web1_mail web1<br>\n";
?>
It runs fine from the CLI needless to say...
Reply With Quote
  #9  
Old 22nd August 2007, 18:14
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,702 Times in 2,545 Posts
Default

Does this script work?
PHP Code:
<?php
phpinfo
();
?>
BTW, Oliver has just written this suPHP-ISPConfig guide for Fedora 7 and CentOS 5: http://www.howtoforge.com/suphp_fedo...with_ispconfig
You might want to take a look at it.
__________________
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 22nd August 2007, 22:34
zetnsh zetnsh is offline
Senior Member
 
Join Date: Aug 2007
Posts: 111
Thanks: 8
Thanked 5 Times in 5 Posts
 
Smile

Just to let you know, I followed your advice and tried out Oliver's HOWTO for suPHP.

Now - I'm using Fedora Core 6 rather than Fedora 7 (that's what my dedicated server came with, and I haven't got the bottle to do a complete system upgrade including Kernel reinstallation on an O/S I am a little unfamiliar with!)

I have rebuilt my server from scratch using the "The Perfect Server - Fedora 7" - the short answer, is that it worked, with a couple of points to note, for Fedora Core 6:

BEFORE Step 4, if installing suPHP as per http://www.howtoforge.com/suphp_fedo...with_ispconfig, make sure you have the apache header files installed:
Code:
yum install httpd-devel
In Step 6, Change the command to:
Code:
Change to system-config-securitylevel-tui
Oh - one final note on ISPConfig - make sure you have this set as below in /etc/suphp.conf:
Code:
[handlers]
;Handler for php-scripts
x-httpd-php=php:/usr/bin/php-cgi
I had it set to /usr/bin/php before, and I think that's where my internal server errors were coming from.

In conclusion, it works well, suPHP is doing it's thing, and I'm a happy bunny! (Apart from suexec - that's another story, another post

Thanks everyone for your help.

Neil

Last edited by zetnsh; 22nd August 2007 at 22:37.
Reply With Quote
The Following User Says Thank You to zetnsh For This Useful Post:
till (22nd August 2007)
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
ispconfig together with other portal app Mr_Miyagi Installation/Configuration 2 24th March 2007 17:19
ISPconfig Virtual Hosts + Perfect setup Problem ? orasis Installation/Configuration 5 16th March 2007 10:46
Installing ISPConfig on a pre-installed x86_64 FC6 w/webmin domino Installation/Configuration 2 13th February 2007 11:21
ISPConfig 2.2.4 released till General 25 18th July 2006 13:04
Users and websites aren't created Glorfindel Installation/Configuration 9 23rd February 2006 04:20


All times are GMT +2. The time now is 22:08.


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