|
This tutorial describes how you can install Apache2 with mod_fcgid and PHP5 on Ubuntu 10.10. mod_fcgid is a compatible alternative to the older mod_fastcgi. It lets you execute PHP scripts with the permissions of their owners instead of the Apache user.
I do not issue any guarantee that this will work for you!
1 Preliminary Note
I'm using an Ubuntu 10.10 server in this tutorial with the hostname server1.example.com and the IP address 192.168.0.100.
I will create two Apache vhosts in this tutorial, www.example1.com and www.example2.com, to demonstrate the usage of mod_fcgid.
Make sure you're logged in as root:
sudo su/bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash. Therefore we do this:
dpkg-reconfigure dashInstall dash as /bin/sh? <-- No
In addition to that, we must disable AppArmor:
/etc/init.d/apparmor stopupdate-rc.d -f apparmor remove
aptitude remove apparmor apparmor-utils
2 Installing Apache2/mod_fcgi/PHP5
In order to install Apache2, mod_fcgid, and PHP5, run
aptitude install apache2 apache2-suexec libapache2-mod-fcgid php5-cgiIf Apache2 was already installed with PHP5 as an Apache module, disable the PHP5 module now:
a2dismod php5Then enable the following modules...
a2enmod rewritea2enmod suexec
a2enmod include
a2enmod fcgid
... and open /etc/php5/cgi/php.ini:
vi /etc/php5/cgi/php.ini Uncomment the line cgi.fix_pathinfo
View the Original article