Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Where to specify gzip and buffer parameters on nginx proxy and nginx web server?

$
0
0
I have setup nginx as reverse proxy which gets all 80 requests and proxies them to other appropriate web servers behind. One of those web servers is also nginx serving php site. I want to specify gzip, buffer, and caching options but I am not sure on which server's nginx.conf to specify them. On the proxy or web server or both. The options that i want to specify is below.

# Compression
gzip on;
gzip_comp_level 2;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain application/x-javascript text/xml text/css application/xml;

# Buffers
client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 8m;
large_client_header_buffers 2 1k;

# Caching Static Files
location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
expires 365d;
}
On which server's configuration file do I specify these? On the nginx proxy or on web server or both?

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>