Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th June 2007, 15:26
pjdevries pjdevries is offline
HowtoForge Supporter
 
Join Date: Sep 2006
Posts: 130
Thanks: 7
Thanked 12 Times in 5 Posts
Default suPHP in custom Debian package

As an answer to my own initial question (see http://www.howtoforge.com/forums/showthread.php?t=12705), I decided to try to create a custom suPHP package to ease the installation of suPHP for use with ISPConfig. This is what I did:
  • Compiled suPHP as described by Hans in his article How To Set Up suPHP On A Debian Etch Based ISPConfig Server.
  • Downloaded and unpacked the stable Debian libapache2-mod-suphp package.
  • Replaced the original mod_suphp.so in the package with the customized version.
  • Adjusted several directives in the package control file:
    • Changed package name
    • Added dependency apache2-prefork-dev
    • Added conflict libapache2-mod-suphp
    • Adjusted Installed-Size
  • Added an additional README.
  • Updated the md5 values.
  • Created the package.
I now have a package that installs with dpkg -i. Doing so with libapache2-mod-suphp already installed or without apache2-prefork-dev (or any of the other dependencies like suphp-common) available, aborts the installation with an appropriate message. In the latter case, apt-get -f install is enough to have the missing packages installed.

After installation, I made the appropriate modifications to /home/admispconfig/ispconfig/lib/config.inc.php and 'touched' a website to have my /etc/apache2/vhosts/Vhosts_ispconfig.conf updated (see How To Set Up suPHP On A Debian Etch Based ISPConfig Server).

On the surface everything seems o.k. The only problem is that my php websites don't work. They all show the familiar "500 error - Internal Server Error!". Adding the neccessary Apache Directives for a site, makes it appear again.

Can anyone assist me in troubleshooting this problem? I have far too little experience to do that all by myself. Ofcourse the package will be made available to the ISPConfig community as soon all the problems have been solved.

Last edited by pjdevries; 21st June 2007 at 14:42.
Reply With Quote
Sponsored Links
  #2  
Old 20th June 2007, 22:24
pjdevries pjdevries is offline
HowtoForge Supporter
 
Join Date: Sep 2006
Posts: 130
Thanks: 7
Thanked 12 Times in 5 Posts
Default

At least one thing is quite strange: there is no suPHP log file. My /etc/suphp/suphp.conf reads: logfile=/var/log/suphp/suphp.log and loglevel=info. The /var/log/suphp directory is there, but it's empty. So it appears that the mod_suphp module is never activated.
Reply With Quote
  #3  
Old 21st June 2007, 12:55
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,501 Times in 4,330 Posts
Default

When you install suphp, you should disable mod_php first. Then make sure that you enabled mod_suphp with the "a2enmod" command. When you get a 500 error, look in the error log of the website where you got the error and post the error message.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 21st June 2007, 16:22
pjdevries pjdevries is offline
HowtoForge Supporter
 
Join Date: Sep 2006
Posts: 130
Thanks: 7
Thanked 12 Times in 5 Posts
Default

Hi Till. Thanks once again for your reply.

Because Hans' howto first disables mod_php but in the end of the article enables it again to support suPHP incompatible applications (which is what I need too), I thought it wouldn't be neccessary to disable it in the first place, so I didn't. Also I expected the Debian package to enable mod_suphp automagically when installing the package, so I didn't do that either.

I did a fresh installation and this time I first disabled mod_php. After installing the package, I explicitly tried to enable mod_suphp, but got the message: 'This module is already enabled!'. So once again all looks well. Unfortunately it still doesn't work. A simple phpinfo script results in the 500 error (the file permissions of the script are 644).

I can't find any related error messages in the apache the log files. I also still don't have a suphp log file. When you say 'the error log of the website', which log file do you mean exactly?
Reply With Quote
  #5  
Old 21st June 2007, 16:25
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,259
Thanks: 215
Thanked 648 Times in 294 Posts
Default log file

Till means the log file within your /var/www/webX/log/
__________________
Hans

MrHostman | Master in managed hosting
Reply With Quote
  #6  
Old 21st June 2007, 21:23
pjdevries pjdevries is offline
HowtoForge Supporter
 
Join Date: Sep 2006
Posts: 130
Thanks: 7
Thanked 12 Times in 5 Posts
Thumbs up The package works!

Thanks Hans (and Till). Inspecting the log file did the trick (I didn't know it existed until now ) because it showed that mod_suphp was looking in the wrong place for the suphp executable. By default mod_suphp looks in /usr/sbin. However, on Debian suphp is installed in directory /usr/lib/suphp by default. Adding the extra option '--sbindir=/usr/lib/suphp' to the configure command of Hans' howto, solved that problem.

So it finally appears to work. I didn't do any intensive testing yet, but my phpinfo script and Roundcube site show regular web pages instead of an annoying 500 error.

There are still some minor issues to deal with though. An important one is the /etc/suphp/suphp.conf file. This file is part of the Debian suphp-common packge, but it differs from the one Hans uses in his howto and that's the one that appears to work fine with ISPConfig, so I would like to include it in the custom mod_suphp package. However, when I do that, I get an error message and installation of my package aborts. Unfortunately I didn't write down the exact message, but it had something to do with the fact that you can not just overwrite a configuration file that originally came with another package. I don't know how to solve that, so I hope someone can give me a few pointers how it should be done in a proper manner. Can you be of any assistance there as well Till?

Once I solved the last few issues, I'll post my custom package in the forum and maybe even write a small howto on how to use it. It will probably be sort of a short version of Hans' howto

At this moment I can't spare the time to set up my own package repository, but if anyone already has one and would like to offer this package from that repository, I would like that very much. Installing the package with aptitude from a repository is much more user friendly than using dpkg because it takes care of all the dependencies.
Reply With Quote
  #7  
Old 22nd June 2007, 00:22
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,501 Times in 4,330 Posts
Default

Sorry, but without a exact error message I do not know what the problem is.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 22nd June 2007, 09:13
pjdevries pjdevries is offline
HowtoForge Supporter
 
Join Date: Sep 2006
Posts: 130
Thanks: 7
Thanked 12 Times in 5 Posts
Default

I can imagine. I'll try to reproduce the error and get back to you later.
Reply With Quote
  #9  
Old 22nd June 2007, 13:52
pjdevries pjdevries is offline
HowtoForge Supporter
 
Join Date: Sep 2006
Posts: 130
Thanks: 7
Thanked 12 Times in 5 Posts
Default

This is what i get when running the command 'dpkg -i obix-ispconfig-libapache2-mod-suphp_0.6.2-1_i386.deb':
Selecting previously deselected package obix-ispconfig-libapache2-mod-suphp.
(Reading database ... 25665 files and directories currently installed.)
Unpacking obix-ispconfig-libapache2-mod-suphp (from obix-ispconfig-libapache2-mod-suphp_0.6.2-1_i386.deb) ...
dpkg: error processing obix-ispconfig-libapache2-mod-suphp_0.6.2-1_i386.deb (--install):
trying to overwrite `/etc/suphp/suphp.conf', which is also in package suphp-common
Errors were encountered while processing:
obix-ispconfig-libapache2-mod-suphp_0.6.2-1_i386.deb
Does this help? Can you give me a clue how to overwrite '/etc/suphp/suphp.conf' in a proper manner?
Reply With Quote
  #10  
Old 22nd June 2007, 14:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
 
Default

Quote:
Originally Posted by pjdevries
dpkg: error processing obix-ispconfig-libapache2-mod-suphp_0.6.2-1_i386.deb (--install):
trying to overwrite `/etc/suphp/suphp.conf', which is also in package suphp-common
Did you set the correct dependencies in the .deb file?
__________________
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
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
Please help me whit bind9 astra2000 Server Operation 12 10th October 2007 03:43
Bind Failed christoph2k HOWTO-Related Questions 4 28th April 2007 01:57
Help....package missing sbovisjb1 Installation/Configuration 3 31st March 2006 12:14
suse 9.3 install: E: Couldn't find package ncftp aallen Installation/Configuration 4 26th January 2006 21:02
e-mail problem!!! Debian 3.1 maroonworks Installation/Configuration 18 6th December 2005 15:42


All times are GMT +2. The time now is 09:26.


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