Welcome! Log In Create A New Profile


Проблема с gzip

July 06, 2014 05:01PM
Здравствуйте. Использую nginx как фронтэнд к апачу, на nginx-е настороено сжатие, вот как выглядит конфиг

user nginx;
worker_processes 4;
worker_rlimit_nofile 30000;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
worker_connections 2056;
## Timeouts
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
gzip on;
gzip_buffers 8 64k;
#gzip_disable Firefox/([0-2]\.|3\.0);
#gzip_disable Chrome/2;
#gzip_disable Safari;
gzip_disable MSIE [4-6]\.;
gzip_comp_level 7;
gzip_http_version 1.0;
gzip_vary on;
gzip_static off;
gzip_types application/javascript text/css text/plain application/x-javascript text/xml application/xml application/xml+rss image/x-icon image/bmp;
gzip_min_length 1024;
gzip_proxied any;
limit_req_zone $binary_remote_addr zone=one:10m rate=2r/s;

server {
listen 80 default_server;
listen 8085;
server_name wot-news.com www.wot-news.com;
access_log /var/log/nginx/host.access.log main;
root /var/www/vhosts/wot-news.com/http;
expires epoch;

location / {
proxy_redirect off;
proxy_pass_header Set-Cookie;
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 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 64k;
proxy_buffers 8 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 10m;
#deny all;
#limit_req zone=one burst=5;
location ~* \.(jpg|jpeg|gif|png|ico|css|bmp|swf|js|html|txt)$ {
root /var/www/vhosts/wot-news.com/http/;
expires 1h;
location /images/ {
root /var/www/vhosts/wot-news.com/http/;
expires 30d;
location /ajax/load_stat/ {
limit_req zone=one burst=4;
location /uploads/files {
add_header Content-type application/octet-stream;
location /uploads/sp {
add_header Content-type application/octet-stream;
location /uploads/clan {
add_header Content-type application/octet-stream;
location /uploads/free {
limit_rate 128k;


При этом все тесты, типа http://checkgzipcompression.com/?url=wot-news.com говорят, что все хорошо, но мой браузер(причем как Moz так chrom), говорят о другом, да и PageSpeed ругается, что не включено сжатие. Очень нужна помощь, так как уже не знаю куда копать. Думал, что проблема в Codeigniter, но и на обычной странице не работает. nginx версии 1.7.2
Subject Author Posted

Проблема с gzip

Edrard July 06, 2014 05:01PM

Re: Проблема с gzip

Edrard July 06, 2014 05:03PM

Re: Проблема с gzip

Валентин Бартенев July 06, 2014 05:18PM

Re: Проблема с gzip

Edrard July 07, 2014 01:57PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 362
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready