hi there,
i am totally newbie, so sorry in advance if this question is too dumb. i need to add the code below to the http or inside server section in the file:
# Enable Gzip compression
gzip on;
# Compression level (1-9)
gzip_comp_level 5;
# Don't compress anything under 256 bytes
gzip_min_length 256;
# Compress output of these MIME-types
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-font-opentype
application/x-font-truetype
application/x-javascript
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/eot
font/opentype
font/otf
image/svg+xml
image/x-icon
image/vnd.microsoft.icon
text/css
text/plain
text/javascript
text/x-component;
# Disable gzip for bad browsers
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
and my nginx.conf is of my VPS (where there are severel sites) like this:
server {
....
root /var/www/example.net/htdocs;
index index.php index.html index.htm;
include common/example.net-php.conf;
include common/wpcommon.conf;
include common/locations.conf;
include common/headers-http.conf;
include common/headers-https.conf;
include common/headers-html.conf;
include /var/www/example.net/*-nginx.conf;
}
so if i create a file named "forgzip-nginx.conf" under >> /var/www/example.net/
what should i put in to that file than first snippet i shared?
Thanks in advance,
i am totally newbie, so sorry in advance if this question is too dumb. i need to add the code below to the http or inside server section in the file:
# Enable Gzip compression
gzip on;
# Compression level (1-9)
gzip_comp_level 5;
# Don't compress anything under 256 bytes
gzip_min_length 256;
# Compress output of these MIME-types
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-font-opentype
application/x-font-truetype
application/x-javascript
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/eot
font/opentype
font/otf
image/svg+xml
image/x-icon
image/vnd.microsoft.icon
text/css
text/plain
text/javascript
text/x-component;
# Disable gzip for bad browsers
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
and my nginx.conf is of my VPS (where there are severel sites) like this:
server {
....
root /var/www/example.net/htdocs;
index index.php index.html index.htm;
include common/example.net-php.conf;
include common/wpcommon.conf;
include common/locations.conf;
include common/headers-http.conf;
include common/headers-https.conf;
include common/headers-html.conf;
include /var/www/example.net/*-nginx.conf;
}
so if i create a file named "forgzip-nginx.conf" under >> /var/www/example.net/
what should i put in to that file than first snippet i shared?
Thanks in advance,