Questions tagged [locationmatch]

An Apache directive to apply the enclosed directives only to URLs matched by a regular expression. Similar to Location, but with regexp support.

29 questions
1
vote
1 answer

LocationMatch to allow a main url excluding specific sub folder

In the httpd.conf I would like to allow a main path but disallow a particular subfolder. Any url with this pattern must be accepted: /app-1.0/public /app-1.0/images /app-1.0/ but this one must be ignored / not allowed. /app-1.0/private I want to use…
Alejandro
  • 134
  • 2
  • 5
1
vote
1 answer

Apache LocationMatch regex ignores duplicate slashes

I'm having a strange behaviour with Apache's LocationMatch directive when there are extra slashes at the beginning of the URL. According to the Apache docs if I'm reading it right this should work:
jpt
  • 453
  • 7
  • 12
1
vote
1 answer

httpd.conf and Location Match error

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…
user2733911
  • 63
  • 1
  • 7
0
votes
1 answer

Apache LocationMatch with regex not working

I'm trying to configure apache server (version 2.4.46) to do a Location match with regex. I've even tried the regex given in the official document. It works fine without the regex. ProxyPass …
UserR
  • 391
  • 1
  • 6
  • 13
0
votes
1 answer

named group backreference in LocationMatch is not recognized in ProxyPassMatch

my English is rather poor and it is my first question, so hopefully I do it the right way ;-) I use Apache HTTPD 2.4.41 (Win64) and I wanted to use following LocationMatch-Rule: .*)/_search$"> AllowMethods GET POST …
michelgen
  • 1
  • 2
0
votes
1 answer

apache LocationMatch

Apache question: I have a wordpress website. I want to protect with password the wp login screen. I don't wanty to allow local .htaccess. In the virtual host i'm using: AuthType Basic …
ziGuy
  • 41
  • 5
0
votes
1 answer

LocationMatch not matching like Location (Apache 2.4)

I'm trying to understand what is going on with LocationMatch. Right now I have a Location similar to the following, RequestHeader set X-Forwarded-Proto https RequestHeader set X-Forwarded-Port 443 ProxyPreserveHost On …
wsams
  • 2,499
  • 7
  • 40
  • 51
0
votes
1 answer

Trigger apache authentication depending on URL parameter

I need to trigger the apache authentications depending only on a URL parameter. For instance, The following URL http://mySillyApplication.com/items/browse?collection=9&sort_field=Title&num_items=10&... I need to trigger the authentication only if…
user969228
  • 141
  • 1
  • 1
  • 6
0
votes
0 answers

Apache doesn't detect ui-router state change

I am using LocationMatch Apache directive to apply some logic to an AngularJS app. To test, I have the regex cover just one state, http://my.ui.com/login Apache Redirect "/login" "/login2" This…
jlewkovich
  • 2,725
  • 2
  • 35
  • 49
0
votes
1 answer

LocationMatch negative expression

I want password protection for the site just webservice URL stay allow all. This expression work perfectly in apache, just need turn opposite. AuthType Basic AuthName "Restricted Files" …
Cipo
  • 161
  • 2
  • 14
0
votes
1 answer

How to configure in Apache an exception to password protection for a CakePhp App?

I have a CakePHP Application which I want to protect with a password. The tricky thing is, that all files/locations should be only accessible with a password EXCEPT one specific Address (a function withing a CakePHP-controller) The Address is like…
Roman Ganz
  • 1,615
  • 1
  • 20
  • 27
0
votes
0 answers

Apache LocationMatch not working

I have a the following directive inside of a directive: ..... I am trying to hit my server with the following URL: http://localhost/blah/api/blah?.... The stuff inside of my
El Guapo
  • 5,581
  • 7
  • 54
  • 82
0
votes
1 answer

UserDir on a django server

I have a django website running with mod_python and Apache. The current configuration directs all / traffic to the django site. Now, I need to enable userDir /~user on the machine as well. I have enabled the userDir module in Apache. Since, Apache…
Mir
  • 23
  • 4
0
votes
1 answer

LocationMatch Regex for versioning

I've tried using the docs but I'm quite new to regex. I've had success with others but the same method is not working for what I'm actually after. I'm trying to send users to different servers based on the version number in the URL. This this case,…
A23
  • 1,596
  • 2
  • 15
  • 31
1
2