Nginx:GZIP: Difference between revisions
No edit summary |
|||
| Line 10: | Line 10: | ||
*Buka file <code>/etc/nginx/nginx.conf</code>. | *Buka file <code>/etc/nginx/nginx.conf</code>. | ||
*Cari line yang tertuliskan | *Cari line yang tertuliskan | ||
<syntaxhighlight lang="nginx"> | |||
gzip on; | |||
</syntaxhighlight> | |||
ubah menjadi | ubah menjadi | ||
<syntaxhighlight lang="nginx"> | |||
#gzip on; | |||
</syntaxhighlight> | |||
*Tambahkan code berikut dibawah line tadi | *Tambahkan code berikut dibawah line tadi | ||
<syntaxhighlight lang="nginx" line="1"> | |||
gzip on; | |||
gzip_vary on; | |||
gzip_min_length 10240; | |||
gzip_proxied expired no-cache no-store private auth; | |||
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml; | |||
gzip_disable "MSIE [1-6]\."; | |||
</syntaxhighlight> | |||
*Restart Nginx | *Restart Nginx | ||
<syntaxhighlight lang="shell"> | |||
sudo service nginx restart | |||
</syntaxhighlight> | |||
*'''Keterangan''' | *'''Keterangan''' | ||