Skip to content
This repository was archived by the owner on May 14, 2020. It is now read-only.

Commit 3ecea97

Browse files
authored
Merge pull request #7 from microparts/corrections
some corrrections
2 parents 4753fe8 + 5bfc929 commit 3ecea97

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

src/Handler/templates/nginx_default.conf.php

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@
125125

126126
# cache informations about FDs, frequently accessed files
127127
# 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;
130130
open_file_cache_min_uses 2;
131131
open_file_cache_errors on;
132132

@@ -170,8 +170,8 @@
170170

171171
# reduce the data that needs to be sent over network -- for testing environment
172172
gzip on;
173-
gzip_min_length 10240;
174-
gzip_comp_level 1;
173+
gzip_min_length 1024;
174+
gzip_comp_level 5;
175175
gzip_vary on;
176176
gzip_disable msie6;
177177
gzip_proxied expired no-cache no-store private auth;
@@ -208,7 +208,7 @@
208208
# number of requests client can make over keep-alive -- for testing environment
209209
keepalive_requests 100000;
210210

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;
212212

213213
server {
214214
listen <?=$serverPort?>;
@@ -224,7 +224,8 @@
224224

225225
<?php if ($platformSupportsAsyncIo):?>
226226
aio on;
227-
output_buffers 1 64k;
227+
directio 512;
228+
output_buffers 128 256k;
228229
<?php endif;?>
229230

230231
port_in_redirect off;
@@ -233,8 +234,8 @@
233234
rewrite ^(.+)/index.html$ $1 permanent;
234235

235236
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";
238239
try_files $uri =404;
239240
}
240241

@@ -267,11 +268,13 @@
267268
<?php endforeach;?>
268269

269270
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;
275278

276279
set $prerender 0;
277280
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

Comments
 (0)