Welcome! Log In Create A New Profile

Advanced

nginx conf access rule blocking certain url's

Posted by usazelf 
nginx conf access rule blocking certain url's
May 23, 2013 05:15PM
We have url's like this: /demand/change_db_value/18050/13/.80/0/cost

Notice the /.80

In our nginx conf for our site we have this access rule: location ~ /\.ht { deny all; log_not_found off; access_log off; }

This rule produces this error in the logs: error.log: access forbidden by rule, server: oursite.tld, request: "GET /demand/change_db_value/18050/13/.80/0/cost HTTP/1.1"

We want to of course block access to any .htaccess files or files beginning with ".", but how do we make an exception for this particular url structure?
Re: nginx conf access rule blocking certain url's
May 24, 2013 04:07AM
Try matching to the start of the URI, i.e. location ^/\.htaccess {...
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 88
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready