Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: LocationMatch - Syntax Error in Regex? |
|
Author |
|
n8tgc
Joined: 24 Nov 2015 Posts: 2 Location: Manchester, NH
|
Posted: Tue 24 Nov '15 21:35 Post subject: LocationMatch - Syntax Error in Regex? |
|
|
Have a web frontend on a workstation running Apache 2.4.7 on Ubuntu 14.04. Authentication to the site is enabled and works as desired, as configured below.
Code: |
<Directory "/var/www/html/mythweb" >
AuthType Digest
AuthName "MythTV"
AuthUserFile /etc/mythtv/mythweb-digest
Require valid-user
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
Order allow,deny
Satisfy any
...
</Directory>
|
However, I am attempting to gain "unauthenticated" access to files in a subfolder using the following...
Code: |
<LocationMatch .*\/tv_icons\/*.*/>
Allow from all
</LocationMatch>
|
Testing the RegEx string shows that it is valid. However when using the URL
http://www.domain.com/folder/subfolder/tv_icons/qubo.png
I am prompted for username/password. Not open access as desired. access.log shows a 401 error.
If I first authenticate, the URL works. However, I would like access to files IN THAT FOLDER without the need to authenticate.
Any suggestions into how I configured LocationMatch incorrectly?
Thanks in advance! |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
|
Back to top |
|
n8tgc
Joined: 24 Nov 2015 Posts: 2 Location: Manchester, NH
|
Posted: Wed 25 Nov '15 0:37 Post subject: Solved! |
|
|
Ok, so I found out that in Apache 2.4 Authentication Configuration changed a little.
I cleaned up a line and added a line...
Code: |
<LocationMatch "/tv_icons">
Allow from all
Satisfy Any
</LocationMatch>
|
Now works perfectly! |
|
Back to top |
|
|
|
|
|
|