Re: Redirect loop problems

2014-10-13 Thread Dewangga Bachrul Alam
Update: I just want to redirect specific URL contains `/go/*` to HTTP, and force others to HTTPS. On 10/14/2014 12:03 PM, Dewangga Bachrul Alam wrote: > Hi, > > Today, I was implement redirect using return 301, here's my snippet: > > server { > listen 80; > server_name domain.tl

Redirect loop problems

2014-10-13 Thread Dewangga Bachrul Alam
Hi, Today, I was implement redirect using return 301, here's my snippet: server { listen 80; server_name domain.tld; error_log /dev/null; access_log off; return 301 https://www.domain.tld$request_uri; } server { listen 80; server

Re: http keep alive with post requests issue

2014-10-13 Thread Valentin V. Bartenev
On Monday 13 October 2014 10:48:26 lzilles wrote: > I figured that the location settings have not been used at all. > So now I can see that even for location settings the same error occurs. If I > use keepalive and proxy_set_header Connection "" it works. As soon as I add > "proxy_http_version 1.1"

Re: proxy_cache_bypass and cache refresh

2014-10-13 Thread Sergey Kandaurov
On 03.10.2014 13:42, Grzegorz Kulewski wrote: Hello, Is it true that a GET request that satisfies proxy_cache_bypass (and generates BYPASS cache status in the access log) should also refresh proxy cache for that URL? There are several tutorials on the Internet that advise that it works. Also

Re: Help! log phase is not executed due to r->count being non-zero

2014-10-13 Thread Maxim Dounin
Hello! On Mon, Oct 13, 2014 at 02:43:07PM -0400, wangweixun wrote: > Thanks for your prompt reply. > > Why do I have to do the work in the post handler? Now I have a stub post > handler. ngx_http_read_client_request_body() does nothing but load the > request body into the original request, which

Re: cannot make catch all ssl server block work [corrected]

2014-10-13 Thread mex
did you tried server_name _; already? did you chained the certs for a.com / c.com in the correct order? see http://nginx.org/en/docs/http/configuring_https_servers.html / An SSL certificate with several names Posted at Nginx Forum: http://forum.nginx.org/read.php?2,253929,253946#msg-25394

Re: Help! log phase is not executed due to r->count being non-zero

2014-10-13 Thread wangweixun
Thanks for your prompt reply. Why do I have to do the work in the post handler? Now I have a stub post handler. ngx_http_read_client_request_body() does nothing but load the request body into the original request, which is used by the next handler. Everything seems to be working fine to me. I'm n

Re: RE: Can I use ngix as a SSL encryption wrapper as Stunnel?

2014-10-13 Thread mex
i dont know of an out-of-the-box-solution, bit this might point into the right direction: - https://github.com/yaoweibin/nginx_tcp_proxy_module - http://stackoverflow.com/questions/5337122/is-it-possible-to-forward-non-http-connecting-request-to-some-other-port-in-ngin cheers, mex Posted at N

Re: Help! log phase is not executed due to r->count being non-zero

2014-10-13 Thread Maxim Dounin
Hello! On Mon, Oct 13, 2014 at 12:41:04PM -0400, wangweixun wrote: > Maxim, > > You are right. Since I need to make a hash of the original request's body, I > do make call to ngx_http_read_client_request_body(). > > What's the best way to decrement the count then? Simply "r->count--;" before >

Re: Help! log phase is not executed due to r->count being non-zero

2014-10-13 Thread wangweixun
Maxim, You are right. Since I need to make a hash of the original request's body, I do make call to ngx_http_read_client_request_body(). What's the best way to decrement the count then? Simply "r->count--;" before returning from the module. By the way, in my access phase module, I need to send a

Re: http keep alive with post requests issue

2014-10-13 Thread lzilles
I figured that the location settings have not been used at all. So now I can see that even for location settings the same error occurs. If I use keepalive and proxy_set_header Connection "" it works. As soon as I add "proxy_http_version 1.1" to any context, the POST responses still get returned dir

Re: Disable log for a specific server {}

2014-10-13 Thread Bráulio Bhavamitra
Thanks Valentin On Fri, Oct 3, 2014 at 8:22 AM, Valentin V. Bartenev wrote: > On Friday 03 October 2014 08:17:22 Bráulio Bhavamitra wrote: >> Hello all, >> >> I use a setup of nginx(ssl)+varnish+nginx+proxy. Because of this, the >> second nginx server should not log the request as it would duplic

http keep alive with post requests issue

2014-10-13 Thread lzilles
Hi, I am using nginx as proxy with an upstream configuration: upstream example_server { server localhost:9000 fail_timeout=0; keepalive 64; } Everything works fine when configuring location to include proxy_http_version and connection header:

Re: Help! log phase is not executed due to r->count being non-zero

2014-10-13 Thread Maxim Dounin
Hello! On Sat, Oct 11, 2014 at 12:28:08AM -0400, wangweixun wrote: > Hey all, > > I'm writing an authentication module that is structurally very similar to > ngx_http_auth_request_module > (https://github.com/PiotrSikora/ngx_http_auth_request_module/blob/master/ngx_http_auth_request_module.c). >

Re: Disable SSL3 handshake errors

2014-10-13 Thread Maxim Dounin
Hello! On Sat, Oct 11, 2014 at 03:49:22PM +0200, Lorenzo Raffio wrote: > I disabled SSL3 in ssl_protocols (ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ). > So PCs with old browsers (example: IE on WinXP) fail to do the handshake > and I have my nginx logs full of these errors > ​​ > : > > SSL_do_handsh

Re: 1.6.2 selective dir logging in doc root

2014-10-13 Thread Maxim Dounin
Hello! On Mon, Oct 13, 2014 at 03:23:09PM +1100, shm...@riseup.net wrote: > is it possible to enable selective dir logging from the document root ? > > i don't want to log access to a specific dir in doc root (and not sub > dirs also) > > i do want to log errors to a specific dir in doc root (a

cannot make catch all ssl server block work [corrected]

2014-10-13 Thread mayak
hi all, i'm having trouble with nginx: #nginx -V nginx version: nginx/1.6.2 built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) TLS SNI support enabled so i use .conf files in the /etc/nginx/conf.d directory server { listen 443 default_server; server_name a.domain.com *.domain.com