Re: How to log POST body data?

2013-07-14 Thread shawnxzhou
Followups, I used echo_read_request_body; and the empty_gif directive seems not work again, they shoud be exclusive in a location? John Watson Wrote: --- > Hi, > > Trying adding this directive to your location: > echo_read_request_body; > >

Re: How to log POST body data?

2013-07-14 Thread shawnxzhou
yes, it works! thanks a lot Posted at Nginx Forum: http://forum.nginx.org/read.php?2,240828,240843#msg-240843 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Proxy returns 504 then blocks next connections

2013-07-14 Thread abstein2
The script is an ASPX script and, to my knowledge, it doesn't use sessions. I don't control the script, but I can't duplicate the behavior when running against the proxied server. It only occurs when going through the proxy. I don't believe sessions are the issue. Posted at Nginx Forum: http://fo

Re: How to log POST body data?

2013-07-14 Thread John Watson
Hi, Trying adding this directive to your location: echo_read_request_body; It needs this 3rd party module though: http://wiki.nginx.org/HttpEchoModule#echo_read_request_body On Sun, Jul 14, 2013 at 7:23 AM, shawnxzhou wrote: > I'm trying to use $request_body but get '-' in my log file for t

nginx proxy_pass

2013-07-14 Thread 曾瑞略
Hello,in nginx1 use proxy_pass to nginx2,when http method is get that is ok,but when http method is post ,nginx2 has no access log,nginx1's response  status is 302;  help please,thank you!! nginx-config details: nginx1-config: server {   listen 80;   server_name ocs.aliyun.test;   access_log "pi

Re: Custom 401 page not displaying or not prompting for credentials

2013-07-14 Thread Michael
Added auth_basic off; as so: location = /401.html { auth_basic off; root G:/Files; } returns error 403 and 'access forbidden by rule' error. So then I added allow all; like this: location = /401.html { allow all; auth_ba

Re: X-Accel-Redirect without internal

2013-07-14 Thread Jonathan Matthews
Everything appears to be as you asked for. Did you perhaps forget your "Content-Disposition" header? Jonathan -- Jonathan Matthews Oxford, London, UK http://www.jpluscplusm.com/contact.html ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org

Re: X-Accel-Redirect without internal

2013-07-14 Thread jordanmoreira57
I tried something like that: default.conf: location / { root /home/; index index.html index.htm index.php; location ~ \.(zip|rar)$ { internal; } proxy_set_header Host $host; proxy_set_header X-Real-IP$remote_ad

Re: Custom 401 page not displaying or not prompting for credentials

2013-07-14 Thread Maxim Dounin
Hello! On Sat, Jul 13, 2013 at 02:40:14PM +0100, Michael wrote: > Hello, I was trying to set a custom error 401 page on my Nginx server > version 1.5.1 using the following methods: > > error_page 401 /401.html > By itself it still displays the default site > > error_page 401 http://example.com/

Re: X-Accel-Redirect without internal

2013-07-14 Thread Maxim Dounin
Hello! On Sun, Jul 14, 2013 at 08:30:38AM -0400, jordanmoreira57 wrote: > Hello, > > My problem is very simple, I'd like to change from php readfile to > x-accel-redirect. I know exactly how to do it, but I have a problem: > > My files are organized like that: > /home/ID(id of directory on mysq

Re: Strange log file behavior

2013-07-14 Thread Maxim Dounin
Hello! On Sun, Jul 14, 2013 at 04:44:53AM -0700, Grant wrote: > I noticed that most of my rotated nginx log files are empty (0 bytes). > > My only access_log directive is in nginx.conf: > > access_log /var/log/nginx/localhost.access_log combined; > > Also nginx is currently logging to > /var/l

How to log POST body data?

2013-07-14 Thread shawnxzhou
I'm trying to use $request_body but get '-' in my log file for this field here is my configure file, is there sth wrong or the $request_body has other deps to work? http { log_format client '$remote_addr - $remote_user $request_time $upstream_response_time ' '[$time_local] "$requ

X-Accel-Redirect without internal

2013-07-14 Thread jordanmoreira57
Hello, My problem is very simple, I'd like to change from php readfile to x-accel-redirect. I know exactly how to do it, but I have a problem: My files are organized like that: /home/ID(id of directory on mysql)/ .mp3 .xml and .zip/.rar I would like to serve the .zip or .rar files by php, but .x

Strange log file behavior

2013-07-14 Thread Grant
I noticed that most of my rotated nginx log files are empty (0 bytes). My only access_log directive is in nginx.conf: access_log /var/log/nginx/localhost.access_log combined; Also nginx is currently logging to /var/log/nginx/localhost.access_log.1 instead of localhost.access_log. Does anyone kn