I am trying to configure Apache to send most URI's to my mod_perl application with the exception of a few files, which I want to serve using the default handler. (send a static file)
I want all http://myserver.com/xxxxx to go to the mod_perl with /, /index.html, robots.txt and a few subfolders to be served statically.
I have tried a number of different combinations but I can't get it to work. There doesn't appear to be a way to negative < LocationMatches > or the like.
If I define the PERL variable, everything goes to the script, with it off, I can sever the static data, but obviously the script doesn't work.
<Directory /home/httpd/plaintext>
AllowOverride None
<Files ~ "(index.html|robots.txt|favicon.gif)">
SetHandler default-script
</Files>
AddDefaultCharset utf-8
DirectorySlash off
Order allow,deny
Allow from all
</Directory>
<IfDefine PERL>
<Location />
SetHandler perl-script
PerlResponseHandler LinkCrunchDB::Handler
</Location>
</IfDefine>
I guess hacking the module to use internal redirects might work, but it's ugly.
I am using Gentoo Linux, which includes all files in the module.d/ folder then vhost.d folder. I have checked all of these and removed any Directory or Location folders, there wasn't any!
Many thanks.