|
125 | 125 |
|
126 | 126 | # cache informations about FDs, frequently accessed files
|
127 | 127 | # can boost performance, but you need to test those values
|
128 |
| - open_file_cache max=200000 inactive=20s; |
129 |
| - open_file_cache_valid 30s; |
| 128 | + open_file_cache max=200000 inactive=2m; |
| 129 | + open_file_cache_valid 10m; |
130 | 130 | open_file_cache_min_uses 2;
|
131 | 131 | open_file_cache_errors on;
|
132 | 132 |
|
|
170 | 170 |
|
171 | 171 | # reduce the data that needs to be sent over network -- for testing environment
|
172 | 172 | gzip on;
|
173 |
| - gzip_min_length 10240; |
174 |
| - gzip_comp_level 1; |
| 173 | + gzip_min_length 1024; |
| 174 | + gzip_comp_level 5; |
175 | 175 | gzip_vary on;
|
176 | 176 | gzip_disable msie6;
|
177 | 177 | gzip_proxied expired no-cache no-store private auth;
|
|
208 | 208 | # number of requests client can make over keep-alive -- for testing environment
|
209 | 209 | keepalive_requests 100000;
|
210 | 210 |
|
211 |
| - proxy_cache_path /tmp levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=128m; |
| 211 | + proxy_cache_path /tmp levels=1:2 keys_zone=STATIC:5m inactive=24h max_size=128m; |
212 | 212 |
|
213 | 213 | server {
|
214 | 214 | listen <?=$serverPort?>;
|
|
224 | 224 |
|
225 | 225 | <?php if ($platformSupportsAsyncIo):?>
|
226 | 226 | aio on;
|
227 |
| - output_buffers 1 64k; |
| 227 | + directio 512; |
| 228 | + output_buffers 128 256k; |
228 | 229 | <?php endif;?>
|
229 | 230 |
|
230 | 231 | port_in_redirect off;
|
|
233 | 234 | rewrite ^(.+)/index.html$ $1 permanent;
|
234 | 235 |
|
235 | 236 | location ~ index\.html {
|
236 |
| - expires 30m; |
237 |
| - add_header "Cache-Control" "public, max-age=1800"; |
| 237 | + expires 3m; |
| 238 | + add_header "Cache-Control" "public, max-age=180"; |
238 | 239 | try_files $uri =404;
|
239 | 240 | }
|
240 | 241 |
|
|
267 | 268 | <?php endforeach;?>
|
268 | 269 |
|
269 | 270 | proxy_read_timeout 120s;
|
270 |
| - proxy_intercept_errors on; |
271 |
| - proxy_buffering on; |
272 |
| - proxy_cache STATIC; |
273 |
| - proxy_cache_valid 200 404 24h; |
274 |
| - proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; |
| 271 | + proxy_intercept_errors on; |
| 272 | + proxy_buffering on; |
| 273 | + proxy_buffers 64 32k; |
| 274 | + proxy_busy_buffers_size 32k; |
| 275 | + proxy_cache STATIC; |
| 276 | + proxy_cache_valid 200 404 24h; |
| 277 | + proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; |
275 | 278 |
|
276 | 279 | set $prerender 0;
|
277 | 280 | if ($http_user_agent ~* "bot|whatsapp|telegram|google|bing|yandex|baiduspider|twitterbot|facebookexternalhit|rogerbot|linkedin|embedly|quora link preview|showyoubot|outbrain|pinterest\/0\.|pinterestbot|slackbot|vkShare|W3C_Validator") {
|
|
0 commit comments