Nginx:GZIP: Difference between revisions
Created page with "NGINX adalah server web open source yang luar biasa. Sangat mudah untuk bangun dan berlari, ringan, dan diarahkan untuk kecepatan. Namun, seperti halnya perangkat lunak server..." |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| 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 | |||
<syntaxhighlight lang="shell"> | |||
sudo service nginx restart | |||
</syntaxhighlight> | |||
*'''Keterangan''' | *'''Keterangan''' | ||