Как заставить Nginx раздавать зипованную статику?

Доброго времени. Собрал nginx с модулем http_gzip_static_module, nginx -V показывает:
--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_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-http_spdy_module --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Wp,-D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed' --with-ipv6
Конфиг Nginx:
location / { gzip_static on; root /var/www; index index.html; }

В папку www лежит файд index.html.gz. Сервер выдает 403 ошибку. Без сжатия всё работает. Пробовал сжимать модулем Grunt и 7-zip, результат одинаковый.
Всё работает на ubuntu 12.04.

Upd. Обнаружил следующее если в папке www лежит несжатый index.html — неважно что в нем, сейчас пустой, то index.html.gz отдается нормально. Что за мистика?

Нет комментариев