TurnKey Linux Virtual Appliance Library

Having trouble switching from mod_php to mod_suphp..??

I've got a simple LAMP stack setup locally to use for a test server. I've got a few virtual hosts already configured and they were working fine except for some permissions issues I was having because of the mod_php handler.

To fix this I followed this guide to install SuPHP: http://www.binarytides.com/blog/install-suphp-on-ubuntu-linux/

Everything went exactly like the guide shows, but now when I try to load a PHP page in any of my current sites I get an Internal Server Error and it won't load.

On my production server I have WHM/Cpanel (sometimes Plesk) and I can actually switch back and forth between the two pretty easily. When I'm on the regular Apache mode I have permissions issues, when I switch to SuPHP (CGI) I don't have the issues. My sites never stop loading, though.

Here, I can see two separate php.ini config files.

- /etc/php5/apache2/php.ini (Configuration for mod_php)
- /etc/php5/cgi/php.ini (Configuration for scripts run via CGI)

So it seems like maybe my current sites are still looking at the mod_php version instead of my new CGI version..?? I'm not sure if I'm on the right track or not but I can't think of any other reason these wouldn't be working. Unfortunately, I'm not finding a simple way to switch this in Webmin like I have with WHM/Cpanel or Plesk.

Any information on this would be greatly appreciated. Thanks!

Turns out

Turns out /etc/suphp/suphp.conf simply needed to be updated to reflect my home directory as the docroot.

It had the following...

docroot=/var/www:${HOME}/public_html

So I changed that to...

docroot=${HOME}

and now things are working as expected...for the most part.  phpMyAdmin still won't load correctly, and it actually just downloads a file now rather than load anything.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)