Apache2 and PHP5 using mod_fcgid

Wanted this Apache combination to keep a server light on memory/cpu;  stay off the Apache2 pre-fork. I am switching out my server from lighttpd to apache. I liked lighttpd, but I have been using apache2 so much lately that it doesn’t make sense to figure out how to set up xyz on two different http servers.

To get Apache2 and PHP5 working you have two options. Either use Apach2 pre-fork (similar to the way Apache1.3 ran), or use fastcgi. I chose the latter option.

I followed these excellent instructions, except for one change:

I put:

FCGIWrapper /usr/lib/cgi-bin/php5 .php

Under my <virtualhost><directory> for the specific site I am hosting that uses php.

Advertisements

One response to “Apache2 and PHP5 using mod_fcgid

  1. I also like lighttpd, but many applications optimised with Apache mod_rewrite’s.

    Btw you can use it on each , but I have lots of vhosts and I’m a very lazy guy. 😀

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s