Using suPHP on my web server to run Joomla - Page 5 Restart apache2
Last Updated on Tuesday, 09 March 2010 15:55 Written by Joe Aldeguer Friday, 30 January 2009 22:09
| Article Index |
|---|
| Using suPHP on my web server to run Joomla |
| Page 2 Packages to install |
| Page 3 Compiling suPHP |
| Page 4 Enabling mod_suphp.so |
| Page 5 Restart apache2 |
| All Pages |
restart apache.
/etc/init.d/apache2 restart
A good tutorial to use for testing if suPHP has been installed and working correctly.
http://www.wbitt.com/my-howtos/49-suphp-for-apache-the-painless-way.html
Checking the logs to check for errors. If there are no errors logs will show the script
is running using the UID of my user account.
Other packages I like to install:
apt-get install php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-json php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl unixodbc unixodbc-dev unixodbc-bin php5-odbc (some of these may already have been installed earlier by virtualmin's install script.)
When asked about Maildir support answer yes.

With suPHP enabled for my virtual host there is no longer a need to lessen the permissions on folders or files. Installing extensions no longer fails now that the script is running as my user account not that of the web server.
Things to keep in mind after moving a Joomla web site which was originally running on a web server not setup to use suPHP into a web server setup to use suPHP. The document root of the Joomla site needs to have 755 for all folders and 644 for files otherwise you will get errors such as this.
Internal error message:
If something is not working check suPHP's logs. If you have used the suphp.conf from this website the location will be /var/log/suphp.log. If using the Debian package setup it will be in /var/log/suphp/suphp.log. Looking at the logs will provide clues to diagnose why it fails to work.
Note: The location to change the php.ini values is now at: /etc/php5/cgi/php.ini.
Once again Joomla is no longer like a love hate relationship, thanks to suPHP creator Sebastian Marsching!
References:
http://www.suphp.org/Documentation.html
http://www.howtoforge.com/apache2_suphp_php4_php5
http://www.debian-administration.org/articles/84
http://www.wbitt.com/index.php/howtos/34-howtos/49-suphp-for-apache--the-painless-way














COMMENTS: (Abusing this comment form with spam would be the most effective way to have your IP, network or country blocked!)
Perfect! Can't say thanks enough. :)
I couldn't get along with IPConfig 3 and so thought I'd come back over here and give Virtualmin a go instead. I just finished installing on a fresh Debian 4 a couple of hours ago after following your guide on another article here. Went great, no problems at all (thanks to the Spamassassin enabling trick).
In case yo haven't tried ISPC 3, I can tell you that Virtualmin is a *world* apart in both function and usage. Chalk and cheese, really.
So next, I'm preparing to do follow the guide above.
Thanks for these guides, they are great. Really helpful. I'm new to Linux (on servers at least) and so am trying to get things set up with the right tools from the beginning, to save having to change loads of things further down the line. These guides are making it a lot easier.
:)
That is really good to hear I am able to offer some help! I have always wanted to share what I have learned from other folks who were kind enough to share their knowledge online.
Have fun using Virtualmin GPL, it really has made managing websites enjoyable!
I’m new at this – just got a new dedicated server – and I’m having this stupid file dir permission and I found your article..
I need to install the suphp and from what I read I have the php5 mod installed as well..
What is the best Method to do.. As I read 1 its seems good to do..
Little confused on this.. on when I get to the 2nd method – Is what in the blue just for it.. then the 1st method continues after the stuff in the blew box?
Thanks for your help
Again I’m a linux newbee.. what is the best program to use to edit it I got Putty
Rick
I use putty too to connect to my Linux server. Once I am connected I use vi to do file edits. If you're not use to using vi you can use Webmin's file manager to edit configuration files. I suggest installing Webmin if you're new to Linux since this will allow you to control your server via a web interface. Search my website for Webmin I have it covered as well. Make sure to use my suggestions to increase Webmin's security.
Which version of Linux are you using? I have only covered using suPHP on Debian 4.0 Linux called Etch. If you are using Debian Etch you have to make sure you have the following installed first:
apt-get install apache2-prefork-dev
apt-get install libapache2-mod-suphp suphp-common
Then just copy the contents of my /etc/suphp.conf to yours.
After that copy these lines into your virtual host configuration:
suPHP_Engine on
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php
Then restart your web server
/etc/init.d/apache2 restart
Unfortunately this tutorial fails to work with Debian Lenny. But there is another solution which is much easier to implement achieving the same result as suPHP.
I have it covered here: http://joealdeguer.com/technology-proj ects/34-web-hosting/86-using-apache2-itk-mpm-on-deb ian-lenny.html
Welcome to Linux!