0
我已經將nginx設置爲反向代理,它獲取所有80個請求並將它們代理到其他適當的Web服務器後面。其中一臺Web服務器也是nginx服務php站點。我想指定gzip,buffer和caching選項,但我不確定在哪個服務器的nginx.conf中指定它們。在代理或Web服務器或兩者上。下面是我想指定的選項。在nginx代理和nginx Web服務器上指定gzip和緩衝區參數的位置?
# 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;
}
在哪個服務器的配置文件中,我是否指定了這些?在nginx代理或Web服務器或兩者?