Occasional misplaced gzip headers?
Frank Farmer
frank at huddler-inc.com
Tue Apr 6 02:54:40 MSD 2010
Thanks for the reply. Responses from our ops guy below:
Yep, looks like empty gzip file indeed. Such spurious bytes
before response may theoretically happen if subrequests are used
incorrectly (i.e.: do you use any 3rd party/your own modules?).
No.
Could you please show nginx -V output and your config?
nginx version: nginx/0.7.65
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-46)
TLS SNI support disabled
configure arguments: --user=nginx --group=nginx
--prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/nginx/tmp/client_body
--http-proxy-temp-path=/var/lib/nginx/tmp/proxy
--http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi
--pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx
--with-http_ssl_module --with-http_realip_module
--with-http_addition_module --with-http_sub_module
--with-http_dav_module --with-http_flv_module
--with-http_gzip_static_module --with-http_stub_status_module
--with-http_perl_module --with-mail --with-mail_ssl_module
--with-cc-opt='-O2 -g -m64 -mtune=generic'
nginx.conf:
worker_processes 1;
events {
worker_connections 1024;
}
http {
include /etc/nginx/conf.d/*.conf;
include mime.types;
include ipban.conf;
include /etc/nginx/proxy.conf;
default_type application/octet-stream;
log_format main '$host $remote_addr - $remote_user [$time_local]
"$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$sent_http_content_type"';
access_log /var/log/nginx/access.log main;
log_format statusonly '$status';
access_log /var/log/nginxpub/status.log statusonly;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
gzip on;
gzip_proxied any;
gzip_types text/plain text/html text/css application/x-javascript
text/xml application/xml application/xml+rss text/javascript;
add_header P3P 'policyref="http://www.somesite.com/w3c/p3p.xml", CP="NOI
DSP COR CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"';
}
proxy.conf:
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 200m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 4 64k;
proxy_buffer_size 64k;
large_client_header_buffers 32 4k;
conf.d/example.conf
server {
listen 80;
server_name example.com <http://example.com>;
include /etc/nginx/extconf/example/nginxipban.conf;
location / {
proxy_pass http://varnish:6081;
}
}
If you are able to reproduce the problem it whould be helpfull to
look into problematic request/response debug log as well. See
here for details:
We'll enable this log for one of the smaller sites we've been seeing
this on, and see if anything interesting comes up.
Thanks!
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100405/ea1a850e/attachment.html>
More information about the nginx
mailing list