1

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.

user2733911
  • 63
  • 1
  • 7
  • http://httpd.apache.org/docs/2.2/en/mod/core.html#locationmatch – CBroe Feb 07 '14 at 20:07
  • Yes, I tried. The way to get it to work is to replace LocationMatch with FilesMatch. I followed the documentation exactly so.. – user2733911 Feb 07 '14 at 20:33
  • 1
    _“I followed the documentation exactly so..”_ – the documentation states that `LocationMatch` _can not_ be used inside `Directory` … – CBroe Feb 07 '14 at 20:35

1 Answers1

0

The error is telling you that you can't nest LocationMatch in Directory. You probably want FilesMatch.

covener
  • 17,402
  • 2
  • 31
  • 45