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

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

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: 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 application

Re: No headers filter for a subrequest

2015-03-16 Thread Maxim Dounin
Hello! On Mon, Mar 16, 2015 at 04:11:04PM +0300, Marat Dakota wrote: But I might copy-paste the code from ngx_http_headers_filter() to my header filter, right? Or something will blow up eventually? Yes (with appropriate changes). Nothing will blow up if done properly. -- Maxim Dounin

limit rate для location

2015-03-16 Thread neomaq
Здравствуйте, прошу подсказать как можно ограничить скорость скачивания нужно чтобы все, кто попал в locaion /ABC занимали в общей полосе отдачи с сервера не более, например, 1 мегабайта, вне зависимости от количества клиентов данного url ? как понял limit_rate работает per user а нужно в

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

Re: No headers filter for a subrequest

2015-03-16 Thread Marat Dakota
But if I have: /location1 { ... } /location2 { add_header XXX-Some-Header Ololo; ... } And I do a subrequest from /location1 handler to /location2? On Mon, Mar 16, 2015 at 3:23 PM, Maxim Dounin mdou...@mdounin.ru wrote: Hello! On Mon, Mar 16, 2015 at 03:14:15PM +0300, Marat

Re: No headers filter for a subrequest

2015-03-16 Thread Marat Dakota
And one more question. I've noticed that I'll have to copy-paste ngx_http_header_val_s definition too (because it is defined in .c file) and this is a risk to have different structures when something is changed in nginx and my module still have the previous version. Another idea is to mock r-main

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: No headers filter for a subrequest

2015-03-16 Thread Maxim Dounin
Hello! On Mon, Mar 16, 2015 at 03:32:30PM +0300, Marat Dakota wrote: I also might have: /location3 { proxy_pass https://www.blabla; } In this case my subrequest has the response headers from www.blabla. This means that the statement that there are no headers in subrequest responses

No headers filter for a subrequest

2015-03-16 Thread Marat Dakota
Hi, I was digging the reason why add_header in nginx config doesn't work for a subrequest and I've found this in ngx_http_headers_filter_module.c: if ((conf-expires == NGX_HTTP_EXPIRES_OFF conf-headers == NULL) || r != r-main) { return ngx_http_next_header_filter(r);

Re: No headers filter for a subrequest

2015-03-16 Thread Maxim Dounin
Hello! On Mon, Mar 16, 2015 at 03:48:45PM +0300, Marat Dakota wrote: Well, my problem is that I need these headers (I eat them from my module's header filter). I use subrequests for API calls. Does this mean that subrequests are the wrong way to do so? Do I need to use upstreams instead?

Re: No headers filter for a subrequest

2015-03-16 Thread Marat Dakota
I also might have: /location3 { proxy_pass https://www.blabla; } In this case my subrequest has the response headers from www.blabla. This means that the statement that there are no headers in subrequest responses is not completely correct. On Mon, Mar 16, 2015 at 3:27 PM, Marat Dakota

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: 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

Re: No headers filter for a subrequest

2015-03-16 Thread Marat Dakota
Well, my problem is that I need these headers (I eat them from my module's header filter). I use subrequests for API calls. Does this mean that subrequests are the wrong way to do so? Do I need to use upstreams instead? On Mon, Mar 16, 2015 at 3:39 PM, Maxim Dounin mdou...@mdounin.ru wrote:

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: When r != r-connection-data

2015-03-16 Thread Yichun Zhang (agentzh)
Hello! On Sun, Mar 15, 2015 at 5:05 PM, Marat Dakota wrote: In a few modules I've found a trick: if (r != r-connection-data) r-connection-data = r; Careful. This is a common hack to cheat nginx's ngx_http_postpone_filter_module when the in-stock subrequest model cannot serve us well.

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