![]() |
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:
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. |
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.
|
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.
|
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? |
log file
Till means the log file within your /var/www/webX/log/ ;)
|
The package works!
Thanks Hans (and Till). Inspecting the log file did the trick (I didn't know it existed until now :o) 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. |
Sorry, but without a exact error message I do not know what the problem is.
|
I can imagine. I'll try to reproduce the error and get back to you later.
|
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.Does this help? Can you give me a clue how to overwrite '/etc/suphp/suphp.conf' in a proper manner? |
Quote:
|
| All times are GMT +2. The time now is 01:29. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.