Help with nginx http auth based on forwarded IP.

2015-03-16 Thread Alex Flex
Hello Nginx, I have these lines: location / { proxy_pass http://172.4.1.2:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $our_x_forwarded_for; satisfy any; allow 116.2.200.1;

Re: restrict sub-directory access divert if not authenticated

2015-03-16 Thread jacograaff
Hi thanks for that your suggestion: - So you say that /shop/index.php doesn't land to /shop/ location? Then ensure that you don't have location /shop/index.php , otherwise see debug log --- I do want access to /shop/ as well as /shop/index.php - but only to a selec

Re: nginx big bug

2015-03-16 Thread antodas
Hello -, I have the similar problem.. !! I installed testlink and running using nginx. Sometimes.. Testlink hangs .. and I need to restart NGINX to get going. 6380#6120: *524 WSARecv() failed (10054: An existing connection was forcibly closed by the remote host) while reading response header f

Re: Fake video sharing Android App !!

2015-03-16 Thread Francis Daly
On Mon, Mar 16, 2015 at 06:45:30PM +0500, shahzaib shahzaib wrote: Hi there, > I have installed that android app and requested log against my ip is > following : > > 39.49.52.224 - - [15/Mar/2015:10:40:26 +0500] "GET > /files/thumbs/2015/03/14/1426310448973c5-1.jpg HTTP/1.1" 200 13096 "-" >

Re: Fake video sharing Android App !!

2015-03-16 Thread itpp2012
A map will be better here; map $http_user_agent $block { default 0; ~*Linux.Android 4\.2\.2 1; etc. } location { if ($block) { return 403; } . Posted at Nginx Forum: http://forum.nginx.org/read.php?2,257269,257286#msg-257286 _

Re: Fake video sharing Android App !!

2015-03-16 Thread Patrik Kernstock
if ($http_user_agent ~* "Linux;Android 4.2.2") { return 403; } Looks correct, but maybe nginx does not like the ";" in the provided string? To be true, I never used such an rule. But anyhow this isn't the perfect solution: You're just blocking Android with version 4.2.2 with that. When an

Re: Fake video sharing Android App !!

2015-03-16 Thread shahzaib shahzaib
Hi, I have installed that android app and requested log against my ip is following : 39.49.52.224 - - [15/Mar/2015:10:40:26 +0500] "GET /files/thumbs/2015/03/14/1426310448973c5-1.jpg HTTP/1.1" 200 13096 "-" "Dalvik/1.6.0 (Linux; U; Android 4.2.2; GT-S7582 Build/JDQ39)" where 39.49.52.224 is

Re: Fake video sharing Android App !!

2015-03-16 Thread Francis Daly
On Mon, Mar 16, 2015 at 04:09:30PM +0500, shahzaib shahzaib wrote: Hi there, > Webserver is nginx and hotlinking is already enabled but the issue with no > Referer_Header for the requests being generated by this android > application. > > What precautions should we take to prevent this applicati

Re: Fake video sharing Android App !!

2015-03-16 Thread Gena Makhomed
On 16.03.2015 13:09, shahzaib shahzaib wrote: Guys, someone cloned our videosharing website and created a FAKE android application using same name as our website and people considering it as our app, which is not. The main problem we're facing is, the videos being served from this android applic

Fake video sharing Android App !!

2015-03-16 Thread shahzaib shahzaib
Guys, someone cloned our videosharing website and created a FAKE android application using same name as our website and people considering it as our app, which is not. The main problem we're facing is, the videos being served from this android application are hotlinked to our server due to which we

Re: restrict sub-directory access divert if not authenticated

2015-03-16 Thread Dmitry Pryadko
16.03.15 8:11, jacograaff пишет: I am moving from a development server to a live server and would like to still test before REALLY going live. I need to redirect access to a sub-folder until I am satisfied with the stability this is what i have: -

Re: Host header in upstream requests

2015-03-16 Thread Dmitry Pryadko
I don't think that something other than manual address-hostname pairs maintainance can help you map $upstream_addr $upstream_hostname { 10.0.0.1:80 hostname1; 10.0.0.2:80 hostname2; } ... proxy_set_header Host $upstream_hostname; 15.03.15 17:19, sapientcloud пишет: Already tried $upstr