FastCGIExternalServer demystified

« 1 2 3 4 5 6 7 8 9View All»

A simple example

In the following examples I’m going to assume a few things:

  • All software is installed in
    /opt
  • You’re able to add and change virtual hosts at will
  • We’ll use some directories in
    /srv/www
  • The Web server is on the machine with the IP address 192.168.1.100

If that’s not the case on your system, make sure to adapt the examples according to your setup.

To enable

mod_fastcgi

add this line to your

httpd.conf

:

LoadModule  fastcgi_modules    modules/mod_fastcgi.so

Also make sure to comment all lines loading

libphp5.so

.

For the first test, let’s create a new virtual host:

<VirtualHost *>
    ServerName    fcgi.test.local
    FastCGIExternalServer /srv/www/fcgi -host 127.0.0.1:9000
    DocumentRoot /srv/www/fcgi
    <Directory /srv/www/fcgi>
        AllowOverride   All
        Order           Allow,Deny
        Allow           from all
    </Directoy>
</VirtualHost>

As you can see, in the first example the path option for the

FastCGIExternalServer

directive is exactly the same as the

DocumentRoot

.
By doing this, you’re basically telling Apache, that everything that resides in this very directory should be handled by

mod_fastcgi

which in turn will pass it on to the external server we specified.

So, let’s check it out.


This entry was posted in PHP, Software, the ugly truth and tagged , , . Bookmark the permalink.

One Response to FastCGIExternalServer demystified

  1. Pingback: External FastCGI With Apache « IT Know-It-All

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>