0
votes
0answers
61 views

Nginx not denying hidden files?

I have the following server block but it doesn't seem to deny hidden files in the root (i.e. files beginning with .) properly. server { listen 80; ## listen for ipv4; this line is default and ...
1
vote
1answer
192 views

nginx deny directory and files to be downloaded

gurus. I have a problem and i dont know how to solve it. I am working with Git and Compass/SASS on some projects. Now i want to protect those directories. When i go only to the folder its all fine – i ...
-1
votes
2answers
111 views

Nginx deny doesn't work for folder files

I'm trying to restrict access to my site to allow only specific IPs and I've got the following problem: when I access www.example.com deny works perfectly, but when I try to access ...
0
votes
3answers
1k views

nginx not blocking user agents

I have this in my .conf file for my website in attempt to block 2 user agents from constantly probing my server. ## Block http user agent - morpheus fucking scanner ## if ($http_user_agent ~* ...
1
vote
2answers
2k views

nginx deny user agent causes error when not encapsulated in quotes

I'm trying to deny some user agents I constantly see probing my nginx web server. If I have this in my .conf file ## Block http user agent - morpheus fucking scanner ## if ($http_user_agent ~* ...
0
votes
1answer
388 views

Reject Nginx request with no authentication in general

Is it possible to reject all nginx request, which don't send basic authentication data with them? I have requests like this: xxx.xxx.xxx.xxx - - [24/Oct/2012:10:32:12 +0200] "POST /path HTTP/1.1" ...
3
votes
1answer
581 views

Denying folder in Nginx causing PHP-FPM to not take precedence

The title says it all, but I have a very interesting problem that I am quite confused on. Basically, I have a simple WordPress installation, and I wish to deny a folder (along with all files in the ...
2
votes
1answer
351 views

Deny all gets overridden by another location block

location /_private { deny all; } location ~ \.php$ { # Workaround PHP vulnerability: # http://forum.nginx.org/read.php?2,88845,page=3 try_files $uri =404; include ...
1
vote
2answers
3k views

NGINX deny IP wildcard?

I currently deny IP addresses like this in the nginx.conf file: deny 42.22.11.531; But how would I deny deny 42.22.*.*; <---- this obviously doesnt work, what is the correct syntax for nginx? ...
9
votes
3answers
12k views

how to restrict access to directory and subdirs

I need to restrict access to any files or subdirs in direstory "testdir". My conf: ... location ~* ^.+\.(jpg|txt)$ { root /var/www/site; } location /testdir { deny all; ...