Tag Archives: fastcgi

Django on cpanel server for shared web hosting

django congrats on successful install
I had a customer request to install Django on cpanel server shared account the other day – took me some time to get it going, mostly because of easyapache not willing to play nice.
Other then that, Jimmy’s blog entry here provides excellent instructions on how to configure it, the only difference being that his cpanel server already had mod_fcgid installed.
So, what I’ll do is just quick recap:
Things to do as root

  1. Make sure your apache had mod_fcgid compiled, if not – run easyapache script from SSH or from WHM web page and make sure mod_fcgid option checked
  2. Install easy_install script –
  3. Use easy_install to install a couple Python packages –
  4. Restart apache, make sure mod_fcgid is loaded

This is it – you can notify customer that he can do his django magic – all prerequisites are in place.

Share Button

Apache, PHP, SuEXEC: added security and control

suhosin
As we know from original article using Apache, PHP in CGI mode along with suExec gives us 2 important security advantages:
– suExec allows to run PHP process with (only) the file owner user privileges, enforcing proper permissions on PHP scripts and thus allowing to avoid cross-site exploits on the server that is running multiple dynamic web sites;
– per site php.ini.
That gives some unique opportunities for securing separate web sites on the server.
Read more »

Share Button

Apache, PHP, SuEXEC: when it just wouldn’t work out.

Looks like I will have a lot to say on this topic still. By now I’ve collected some cases when you can not use PHP in FastCGI mode and to keep the sites running you will need to abandon suEXEC nice and clean privilege separation mechanism in favor of mod_php/ASAPI.
Read more »

Share Button

Apache2, PHP, SuEXEC configuration on CentOS

There are plenty of tutorials on the web. Tons and tons.

However when I had to create working configuration and put together Virtualmin template most of these instruction just didn’t work properly. After some time I’ve came up with my own working configuration and proper Virtualmin apache template for CentOS.

As a bonus we’ll have per-user php.ini and apache2 worker MPM which is a little bit faster and less resource hungry then traditional prefork MPM.
Read more »

Share Button