This question about Configuration: Answered
FastCGI - ApacheConfigGenerator - <LocationMatch not allowed here - Error
Error
I get this error - "<LocationMatch not allowed here" when I am trying to start httpd (apache) server after configuring it for
FastCGI.
I strongly believe the error is due to the <LocationMatch> directive being inside the <Directory> context which is disallowed.
I have copied this directive by generating it from
ApacheConfigGenerator. The option I selected was 'FastCGI'.
Can someone please help me with the right directive for
FastCGI.
How to Reproduce
Use
ApacheConfigGenerator to generate the *.conf extension to be added to <httpd root>/conf.d.
The configuration file contains a <LocationMatch> directive inside <Directory "/var/www/foswiki/bin">
The <LocationMatch> directive must be moved outside the <Directory> directive. A basic configuration is mentioned below. This is taken from
FastCGIEngineContrib.
<LocationMatch "^%URL%/+(attach|edit|manage|rename|save|upload|.*auth|rest|login|logon)">
AuthType Basic
AuthName "Foswiki login realm"
AuthUserFile "%ROOT%/data/.htpasswd"
Require valid-user
</LocationMatch>