Alister West

home is where your code is ...

Apache Directives (location, directory, files, etc..)

with mod_perl + cgi-bin

# I am running mod_perl under /. I also want /cgi-bin/ to work.
# When combining Location blocks make sure 'cgi-bin' block follows root block.
# Apache 2.2

<Location />
    Order allow,deny
    Allow from all
    SetHandler modperl
    PerlResponseHandler Plack::Handler::Apache2
    PerlSetVar psgi_app /var/home/alister/example.com/my/app/path
</Location>

# Tell Location block where cgi's are
Alias /cgi-bin/ /var/home/alister/example.com/cgi-bin/

# This block *must* follow / in order to merge correctly 
<Location /cgi-bin/>
    Options +ExecCGI
    SetHandler cgi-script
</Location>

# Run PHP via mod-php instead of cgi
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
AddType application/x-httpd-php .php
<Location /cgi-bin/*.php>
    SetHandler application/x-httpd-php
</Location>
By Alister West