proxy_pass & getServerPort problems

2014-02-11 Thread Jiang Web
When I use the nginx upstream and proxy_pass to Reverse Proxy the request. the configuration is: upstream w3new_cls { server szxap205-in.huawei.com:9090; server szxap206-in.huawei.com:9090; } server { listen 80; server_name w3.huawei.com; location /NetWeb/ { proxy_pass http://w3new_cls/NetWeb/;

Re: Images Aren't Displaying When Perl Interpreter Is Enabled

2014-02-11 Thread MasterMind
Oops :X https://stats.site.com/icon/other/vv.png # Block Image Hotlinking location /icon/ { valid_referers none blocked stats.site.com; if ($invalid_referer) { return 403; } I thought maybe the image hotlinking part broke it, so i removed it and images still dont display. I just tried copying a

security risks... ( a bit OT )

2014-02-11 Thread Steve Holdoway
Hi folks, I'm just about to build up a server to take over about 100 smallish drupal sites. I've found that it is better to share a lot of resources between sites if possible, rather than allocate small slices to each. I am talking about the php-fpm backend that I'll be using here, not nginx dire

Re: Path components interpretation by nginx.

2014-02-11 Thread Steve Holdoway
3.3 Path... End of para 1. "The path is terminated by the first question mark ("?") or number sign ("#") character, or by the end of the URI." although I think most web servers add & to ?. Steve On Wed, 2014-02-12 at 02:07 +0100, António P. P. Almeida wrote: > Hello, > > > While doing an aud

Path components interpretation by nginx.

2014-02-11 Thread António P . P . Almeida
Hello, While doing an audit for a client I came across an URL of the from: http://host/foobar;arg=quux?q=en/somewhere&a=1&b=2 Now doing something like: location /test-args { return 200 "u: $uri\nq: $query_string\na: $args\n"; } This returns as the value of $uri the string foobar;arg=quux,

RE: TCP -TLS Redirection

2014-02-11 Thread Lukas Tribus
Hi, > I want to do a tcp to tls proxy. we need to communicate to apple server > via tls (tcp over ssl). our server does not have internet access so we > need to use a proxy server that has internet access which can > > * either accept the tcp communication and do a tls communication with > apns.

Re: RE: Proxy to upstream HTTPS server *with different* keys/certs in nginx

2014-02-11 Thread tbamise
Thanks Lukas! Guess I have to patch Nginx to use client certificates with upstream servers. Any suggestion as to a good place to start? I'm looking to nix_http_upstream.c and gnx_event_openssl.c Posted at Nginx Forum: http://forum.nginx.org/read.php?2,247305,247433#msg-247433 ___

RE: Proxy to upstream HTTPS server *with different* keys/certs in nginx

2014-02-11 Thread Lukas Tribus
> I am using client certificates on nginx side to connect to upstream https. > Issues is when I turn on client verification on upstream server, nginx > doesn't provide the client certificates. > > Any ideas why? Please read Maxim's responses. ___

Re: RE: Proxy to upstream HTTPS server *with different* keys/certs in nginx

2014-02-11 Thread tbamise
> > you are using client certificates, which is way you need a certificate > + key > on the nginx side to connect to upstream https. > I am using client certificates on nginx side to connect to upstream https. Issues is when I turn on client verification on upstream server, nginx doesn't provid

Re: TCP -TLS Redirection

2014-02-11 Thread Amit Dixit
Exploring on Ngnix Posted at Nginx Forum: http://forum.nginx.org/read.php?2,245248,247430#msg-247430 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Aleksandar Lazic
Am 11-02-2014 18:56, schrieb Valentin V. Bartenev: On Tuesday 11 February 2014 16:44:57 Aleksandar Lazic wrote: Am 11-02-2014 16:28, schrieb Valentin V. Bartenev: > On Tuesday 11 February 2014 19:06:37 Maxim Dounin wrote: >> Hello! >> >> On Tue, Feb 11, 2014 at 06:16:48PM +0400, Valentin V. B

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Valentin V. Bartenev
On Tuesday 11 February 2014 16:44:57 Aleksandar Lazic wrote: > > Am 11-02-2014 16:28, schrieb Valentin V. Bartenev: > > On Tuesday 11 February 2014 19:06:37 Maxim Dounin wrote: > >> Hello! > >> > >> On Tue, Feb 11, 2014 at 06:16:48PM +0400, Valentin V. Bartenev wrote: > >> > >> > On Tuesday 11 F

Re: acess log over nfs hanging

2014-02-11 Thread David Birdsong
On Tue, Feb 11, 2014 at 1:30 AM, Anton Yuzhaninov wrote: > On 02/07/14 20:28, Jader H. Silva wrote: > >> It seems that when some processes are running in the nfs server, the >> share won't >> allow writing for some time and I noticed all nginx workers in status D >> and not >> processing requests

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Valentin V. Bartenev
On Tuesday 11 February 2014 20:29:25 Maxim Dounin wrote: > Hello! > > On Tue, Feb 11, 2014 at 07:28:43PM +0400, Valentin V. Bartenev wrote: > > > On Tuesday 11 February 2014 19:06:37 Maxim Dounin wrote: > > > Hello! > > > > > > On Tue, Feb 11, 2014 at 06:16:48PM +0400, Valentin V. Bartenev wrote

Re: Nginx returning 414 even when large_client_header_buffers is set

2014-02-11 Thread ct323i
Hi spacerobot, I am encountering a very similar problem with my nginx/unicorn server with an 11k URI, getting error "HTTP/1.1 414 Request-URI Too Long". We have also modified the nginx.conf httpd context to include: client_header_buffer_size 32k; large_client_header_buffers 16 512k; Which

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Maxim Dounin
Hello! On Tue, Feb 11, 2014 at 07:28:43PM +0400, Valentin V. Bartenev wrote: > On Tuesday 11 February 2014 19:06:37 Maxim Dounin wrote: > > Hello! > > > > On Tue, Feb 11, 2014 at 06:16:48PM +0400, Valentin V. Bartenev wrote: > > > > > On Tuesday 11 February 2014 18:06:38 Maxim Dounin wrote: > >

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Aleksandar Lazic
Am 11-02-2014 16:28, schrieb Valentin V. Bartenev: On Tuesday 11 February 2014 19:06:37 Maxim Dounin wrote: Hello! On Tue, Feb 11, 2014 at 06:16:48PM +0400, Valentin V. Bartenev wrote: > On Tuesday 11 February 2014 18:06:38 Maxim Dounin wrote: > [..] > > > >(As for backlog size, I usually set

Re: Sometimes SPDY/2, Sometimes SPDY/3.1?

2014-02-11 Thread mevans336
Bingo, I issued a -USR2 but a ps shows both the old and new master processes listening. Thanks Maxim. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,247412,247418#msg-247418 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mail

Re: ASP.NET pages with nginx

2014-02-11 Thread parnican
You have all my respect! Hello World! Got an aspx page running on nginx!!! THANK YOU! Posted at Nginx Forum: http://forum.nginx.org/read.php?2,247323,247417#msg-247417 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/n

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Valentin V. Bartenev
On Tuesday 11 February 2014 19:06:37 Maxim Dounin wrote: > Hello! > > On Tue, Feb 11, 2014 at 06:16:48PM +0400, Valentin V. Bartenev wrote: > > > On Tuesday 11 February 2014 18:06:38 Maxim Dounin wrote: > > [..] > > > > >(As for backlog size, I usually set it to something big enough to > > > > >a

Re: Sometimes SPDY/2, Sometimes SPDY/3.1?

2014-02-11 Thread Maxim Dounin
Hello! On Tue, Feb 11, 2014 at 09:59:52AM -0500, mevans336 wrote: > Hello Everyone, > > We have been running SPDY/2 for months and months without issue and recently > upgraded to 1.5.10 for SPDY/3.1 support. However, we are having an issue > where sometimes our site reports SPDY/2 and sometimes

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Maxim Dounin
Hello! On Tue, Feb 11, 2014 at 06:16:48PM +0400, Valentin V. Bartenev wrote: > On Tuesday 11 February 2014 18:06:38 Maxim Dounin wrote: > [..] > > > >(As for backlog size, I usually set it to something big enough to > > > >accomodate about 1 or 2 seconds of expected peek connection rate. > > > >T

Re: ASP.NET pages with nginx

2014-02-11 Thread Jonathan Matthews
On 11 Feb 2014 15:09, "parnican" wrote: > > This didn't work. > proxy_set_header Host $proxy_host; > next try > proxy_set_header Host $http_host:8080; Tell your app to expect "bernolak.dyndns.info", without the port suffix. Tell nginx to set the Host header to "bernolak.dyndns.info", without th

Sometimes SPDY/2, Sometimes SPDY/3.1?

2014-02-11 Thread mevans336
Hello Everyone, We have been running SPDY/2 for months and months without issue and recently upgraded to 1.5.10 for SPDY/3.1 support. However, we are having an issue where sometimes our site reports SPDY/2 and sometimes it reports SPDY/3.1 in Chrome's net-internals and the Chrome spdy extension. W

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Valentin V. Bartenev
On Tuesday 11 February 2014 18:06:38 Maxim Dounin wrote: [..] > > >(As for backlog size, I usually set it to something big enough to > > >accomodate about 1 or 2 seconds of expected peek connection rate. > > >That is, 1024 is good enough for about 500 connections per second. > > >But with deferred

nginx-1.4.5

2014-02-11 Thread Maxim Dounin
Changes with nginx 1.4.5 11 Feb 2014 *) Bugfix: the $ssl_session_id variable contained full session serialized instead of just a session id. Thanks to Ivan Ristić. *) Bugfix: client connections might be immediately closed if deferred

Re: ASP.NET pages with nginx

2014-02-11 Thread parnican
This didn't work. proxy_set_header Host $proxy_host; next try proxy_set_header Host $http_host:8080; added #proxy_set_header Connection close; //or location / { root /var/www/demo; index index.html index.htm default.aspx Default.aspx; proxy_set_header Host $proxy_host;

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Maxim Dounin
Hello! On Tue, Feb 11, 2014 at 02:14:14PM +0100, Aleksandar Lazic wrote: > Hi. > > Am 11-02-2014 13:28, schrieb Maxim Dounin: > >Hello! > > > >On Tue, Feb 11, 2014 at 01:10:59PM +0100, Aleksandar Lazic wrote: > > > >> > >>Am 11-02-2014 12:48, schrieb Maxim Dounin: > >>>Hello! > >>> > >>>On Tue,

Re: ASP.NET pages with nginx

2014-02-11 Thread parnican
You are right, now its that phase..throwing crap at a wall and seeing what sticks ;-) WinForm app, better to say console app, hello world.exe is working. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,247323,247403#msg-247403 ___ nginx maili

Re: ASP.NET pages with nginx

2014-02-11 Thread Jonathan Matthews
On 11 Feb 2014 13:44, "parnican" wrote: > > Just did some experiments with following settings: > proxy_set_header X-Real-IP $remote_addr; > proxy_pass_header X-Accel-Redirect; > > No change:( ...its time to give up or any ides? How about using it to set the header that contains the "wrong" set

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Aleksandar Lazic
Hi. Am 11-02-2014 13:28, schrieb Maxim Dounin: Hello! On Tue, Feb 11, 2014 at 01:10:59PM +0100, Aleksandar Lazic wrote: Am 11-02-2014 12:48, schrieb Maxim Dounin: >Hello! > >On Tue, Feb 11, 2014 at 12:34:59PM +0100, Aleksandar Lazic wrote: > [snipp] >>>You haven't shown your server level c

Re: ASP.NET pages with nginx

2014-02-11 Thread parnican
Just did some experiments with following settings: proxy_set_header X-Real-IP $remote_addr; proxy_pass_header X-Accel-Redirect; No change:( ...its time to give up or any ides? Also tried: proxy_cache_bypass $cookie_nocache $arg_nocache $arg_comment; proxy_cache_bypass $http_pragma $http_author

Re: Protecting URIs with OAuth2

2014-02-11 Thread Jonathan Matthews
On 11 Feb 2014 06:33, "kate_r" wrote: > > Hi > > Does anyone know how to protect an URI with OAuth authentication? the > upstream sever is already capable of issuing new tokens, but I'm hoping that > nginx can check the access token for certain URIs. In my experience, you can easily use nginx to

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Maxim Dounin
Hello! On Tue, Feb 11, 2014 at 01:10:59PM +0100, Aleksandar Lazic wrote: > > Am 11-02-2014 12:48, schrieb Maxim Dounin: > >Hello! > > > >On Tue, Feb 11, 2014 at 12:34:59PM +0100, Aleksandar Lazic wrote: > > > > [snipp] > > >>>You haven't shown your server level configuration. > >>>Do you use d

Re: ASP.NET pages with nginx

2014-02-11 Thread Jonathan Matthews
On 10 Feb 2014 17:12, "parnican" wrote: > > I have tried "experiments" with following parameters but no change..not sure > this is the way i should go... Any suggestion how to make nginx *not* pass > through the ":8080? How about proxy_set_header? J __

Re: "Idiomatic" Gallery3 configuration

2014-02-11 Thread Gwyneth Llewelyn
As far as I can tell, this looks good to me, and it's better to use rewrites than "if", which is what (sadly) the Gallery3 wiki still shows. My current issue is that album thumbnails, which use an URL ending in [i].album.jpg?...[/i] (a dot before the album name, a query with a question mark after

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Aleksandar Lazic
Am 11-02-2014 12:48, schrieb Maxim Dounin: Hello! On Tue, Feb 11, 2014 at 12:34:59PM +0100, Aleksandar Lazic wrote: [snipp] >You haven't shown your server level configuration. >Do you use deferred accept? yes listen :80 deferred default_server; Try switching it off, there could b

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Aleksandar Lazic
Am 11-02-2014 12:45, schrieb Valentin V. Bartenev: On Tuesday 11 February 2014 12:34:59 Aleksandar Lazic wrote: [..] > > You haven't shown your server level configuration. > Do you use deferred accept? yes listen :80 deferred default_server; Ok. Two other guesses: you have tcp_sync

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Maxim Dounin
Hello! On Tue, Feb 11, 2014 at 12:34:59PM +0100, Aleksandar Lazic wrote: > > > Am 11-02-2014 12:14, schrieb Valentin V. Bartenev: > >On Monday 10 February 2014 17:41:47 Aleksandar Lazic wrote: > > [snipp] > > >>Every time when I have more then ~400 r/s we get no data from the > >>status-reque

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Valentin V. Bartenev
On Tuesday 11 February 2014 12:34:59 Aleksandar Lazic wrote: [..] > > > > You haven't shown your server level configuration. > > Do you use deferred accept? > > yes > > listen :80 deferred default_server; > Ok. Two other guesses: you have tcp_syncookies disabled, and tcp_abort_on_overfl

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Aleksandar Lazic
Am 11-02-2014 12:15, schrieb Maxim Dounin: Hello! On Mon, Feb 10, 2014 at 05:41:47PM +0100, Aleksandar Lazic wrote: [...] Every time when I have more then ~400 r/s we get no data from the status-request, this request rate means ~20k Packets/Second. I use netfilter with fail2ban, but not the

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Aleksandar Lazic
Am 11-02-2014 12:14, schrieb Valentin V. Bartenev: On Monday 10 February 2014 17:41:47 Aleksandar Lazic wrote: [snipp] Every time when I have more then ~400 r/s we get no data from the status-request, this request rate means ~20k Packets/Second. I use netfilter with fail2ban, but not the co

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Valentin V. Bartenev
On Monday 10 February 2014 17:41:47 Aleksandar Lazic wrote: > Hi Jonathan. > > Sorry to be unclear, thanks for answer and question. > > Am 10-02-2014 16:37, schrieb Jonathan Matthews: > > On 10 February 2014 12:06, Aleksandar Lazic wrote: > >> Thanks for help. > > > > Aleksandar - I can't work

Re: high Traffic setup problem, module status don't deliver data

2014-02-11 Thread Maxim Dounin
Hello! On Mon, Feb 10, 2014 at 05:41:47PM +0100, Aleksandar Lazic wrote: [...] > Every time when I have more then ~400 r/s we get no data from the > status-request, this request rate means ~20k Packets/Second. > I use netfilter with fail2ban, but not the connection tracking module! > > I have n

Re: upstream sent too big header while reading response header from upstream

2014-02-11 Thread Maxim Dounin
Hello! On Mon, Feb 10, 2014 at 09:45:50AM -0800, Jeroen Ooms wrote: > On Mon, Feb 10, 2014 at 5:15 AM, Maxim Dounin wrote: > > it is likely the cause, as the config includes the following lines: > > > > proxy_cache_methods POST; > > proxy_cache_key "$request_method$request_uri$request_bo

Re: upstream_response_time

2014-02-11 Thread Gena Makhomed
On 11.02.2014 11:04, Ruslan Ermilov wrote: I am using add_header x-responsetime $upstream_response_time; to report response times of the back-end to the client. I was expecting to see the back-end response time (e.g. 0.500 for half a second), however the headers that I am getting contain

Re: acess log over nfs hanging

2014-02-11 Thread Anton Yuzhaninov
On 02/07/14 20:28, Jader H. Silva wrote: It seems that when some processes are running in the nfs server, the share won't allow writing for some time and I noticed all nginx workers in status D and not processing requests. I general it is a bad idea to write logs over NFS instead local HDD. If

[rewrite] replace the __ to %

2014-02-11 Thread Harold.Miao
hi all , I have a problem about rewrite location ~ (\.ts)$ { } req: http://127.0.0.1/__ce__a3__c7__e9__b5__fd__d5__bd(1080P__bb__ad__d6__ca).ts I need to replace __ to % : http://127.0.0.1/%ce%a3%c7%e9%b5%fd%d5%bd(1080P%bb%ad%d6%ca).ts How to design the "rewrite" cmd? THX -- Best Rega

Re: upstream_response_time

2014-02-11 Thread Ruslan Ermilov
On Mon, Feb 10, 2014 at 02:17:30PM -0800, Jeroen Ooms wrote: > I am using > > add_header x-responsetime $upstream_response_time; > > to report response times of the back-end to the client. I was > expecting to see the back-end response time (e.g. 0.500 for half a > second), however the header