This is how part of my httpd.conf file looks (apache 2.215, mod_perl 2.0000005-orsomething, newest HTML::Mason)
# user's Mason Handler Thingy Handler
SetEnv PERL5 /home/user/perl5/lib
PerlSwitches -I/home/user/perl5/lib
PerlModule HTML::Mason::ApacheHandler
<Directory /var/www/html/user>
<LocationMatch "\.html$">
SetHandler modperl
PerlResponseHandler HTML::Mason::ApacheHandler
</LocationMatch>
</Directory>
# end user's Mason Handler Thingy Handler
The error I get on restarting apache back up is:
[root@server folder]# /etc/init.d/httpd start
Starting httpd: Syntax error on line 1020 of /etc/httpd/conf/httpd.conf:
<LocationMatch not allowed here
[FAILED]
[root@server folder]#
Line 1020 is the location match tag
I don't exactly know what's wrong with this configuration, I can't get apache to restart back up.
The error is telling you that you can't nest LocationMatch in Directory. You probably want FilesMatch.