This tutorial describes how you can install Apache2 with mod_fcgid and PHP5 on Ubuntu 10.04. 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!
I'm using an Ubuntu 10.04 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 dash
Install dash as /bin/sh? <-- No
In addition to that, we must disable AppArmor:
/etc/init.d/apparmor stop
update-rc.d -f apparmor remove
aptitude remove apparmor apparmor-utils
In order to install Apache2, mod_fcgid, and PHP5, run
aptitude install apache2 apache2-suexec libapache2-mod-fcgid php5-cgi
If Apache2 was already installed with PHP5 as an Apache module, disable the PHP5 module now:
a2dismod php5
Then enable the following modules...
a2enmod rewrite
a2enmod suexec
a2enmod include
a2enmod fcgid
... and open /etc/php5/cgi/php.ini:
vi /etc/php5/cgi/php.ini
Uncomment the line cgi.fix_pathinfo = 1:
Fonte notizia: HowtoForge
Data Pubblicazione: 07/09/2010
Inserita da: Chi