Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Language specific forums Russian (Русский) Веб сервер
  • Search

ngnix gzip

Вопросы по работе Веб сервера
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
7 posts • Page 1 of 1
muzhik
Posts: 18
Joined: Thu Dec 12, 2013 6:42 pm

ngnix gzip
  • Quote

Post by muzhik » Sat May 10, 2014 7:36 am

хотел включить для сайта пользователя gzip

прописал новую директиву http и gzip-параметры.
при перезапуске nginx выдает что там эта директива запрещена. Куда ее прописать чтобы включить для отдельного сайта/юзера куда прописать если я хочу включить на все сайты?

предлагаю настройки сжатия вынести в настройки домена.
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: ngnix gzip
  • Quote

Post by imperio » Sat May 10, 2014 8:23 am

По умолчанию gzip сжатие в главном конфиге nginx /etc/nginx/nginx.conf - включено

Code: Select all

# Compression
    gzip                on;
    gzip_comp_level     9;
    gzip_min_length     512;
    gzip_buffers        8 64k;
    gzip_types          text/plain text/css text/javascript
                        application/x-javascript;
    gzip_proxied        any;
Top

Abraham777
Posts: 76
Joined: Tue Feb 19, 2013 12:40 pm

Re: ngnix gzip
  • Quote

Post by Abraham777 » Thu Oct 09, 2014 7:59 am

http://developers.google.com/speed/pagespeed/ не видит включенный gzip. С чем это может быть связанно?
Top

rigs
Posts: 1
Joined: Thu Jan 22, 2015 5:45 pm

Re: ngnix gzip
  • Quote

Post by rigs » Thu Jan 22, 2015 5:56 pm

Replace current the gzip_types (In nginx.conf) with this:

Code: Select all

text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype;
and then restart nginx and run PageSpeed again. It works for me.

In case you're using Wordpress and notice note odd characters in your website, try to turn off the compression feature in cache plugin, such as w3 total cache, hypercache, etc.
Top

AmiGator
Posts: 26
Joined: Wed Mar 05, 2014 2:28 pm

Re: ngnix gzip
  • Quote

Post by AmiGator » Thu Apr 09, 2015 3:56 pm

rigs wrote:Replace current the gzip_types (In nginx.conf) with this:

Code: Select all

text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype;
Это действительно работает!
Хорошо бы разработчикам это как то внедрить :-)
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: ngnix gzip
  • Quote

Post by imperio » Thu Apr 09, 2015 4:16 pm

AmiGator wrote:
rigs wrote:Replace current the gzip_types (In nginx.conf) with this:

Code: Select all

text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype;
Это действительно работает!
Хорошо бы разработчикам это как то внедрить :-)
https://bugs.vestacp.com/
Top

bodzilla
Posts: 2
Joined: Sun Nov 01, 2015 9:16 pm

Re: ngnix gzip
  • Quote

Post by bodzilla » Tue Jan 12, 2016 6:44 pm

Спасибо, работает!
Можете добавить в следующий релиз.
Top


Post Reply
  • Print view

7 posts • Page 1 of 1

Return to “Веб сервер”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password