Apache to the rescue!
Clearly we need a way to seperate the PHP code from all the other stuff in and below the document root. There’s a nice Apache config statement that allows us to du just that:
. So let’s modify our virtual host config a bit:
<VirtualHost *> ServerName fcgi.test.local FastCGIExternalServer /fcgi/www/fcgi -host 127.0.0.1:9000 AddHandler php-fastcgi .php DocumentRoot /srv/www/fcgi <Directory /srv/www/fcgi> AllowOverride All Order Allow,Deny Allow from all </Directoy> </VirtualHost>
Now, what happened here? First, we changed the (not so virtual) path for the
to point to a new – as of yet non-existant – directory. Thus, the external PHP server will for the moment never be called and therefor it won’t interfere with graphics, CSS and other stuff.
Also, the new
directive instructs Apache to call the Action named
for every file with an extenstion of
. So obviously we have to provide this handler using the