nginx not gzipping php output

djeyewater nginx-forum at
Tue Sep 6 13:12:32 UTC 2011

Nginx isn't gzipping php pages, but I don't know why? I'm using the
Audits tab in Google Chrome Developer tools to determine that the pages
aren't being gzipped.

My config:
nginx version: nginx/0.8.52
built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5) 
configure arguments: --prefix=/home/djeyewater/apps/nginx
--without-http_autoindex_module --without-http_charset_module
--without-http_empty_gif_module --without-http_geo_module
--without-http_ssi_module --with-http_gzip_static_module
--with-http_realip_module --with-http_geoip_module --with-cc-opt='-I
--with-ld-opt='-Wl,-R,/home/djeyewater/apps/GeoIP/lib -L

And http section from the .conf file:
http {
	include       mime.types;
	default_type  application/octet-stream;

	server_names_hash_bucket_size 128;

	sendfile        on;
	keepalive_timeout  10 10;
	port_in_redirect off;
	#Fix IP address
	real_ip_header     X-Forwarded-For;

	gzip  on;
	gzip_comp_level 3;
	gzip_proxied any;
	gzip_types text/plain text/css application/x-javascript text/xml
application/xml application/xhtml+xml application/xml+rss
	gzip_disable "MSIE [1-6]\.";
	geoip_country /home/djeyewater/apps/GeoIP/share/GeoIP/GeoIP.dat;
	log_format main '$remote_addr - $remote_user [$time_local] '
	             '"$request" $status $body_bytes_sent "$http_referer" '

	include sites/*;



Posted at Nginx Forum:,214879,214879#msg-214879

More information about the nginx mailing list