diff options
Diffstat (limited to 'doc/md/Server-configuration.md')
-rw-r--r-- | doc/md/Server-configuration.md | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/doc/md/Server-configuration.md b/doc/md/Server-configuration.md index 66db8c57..a49b6033 100644 --- a/doc/md/Server-configuration.md +++ b/doc/md/Server-configuration.md | |||
@@ -301,7 +301,7 @@ server { | |||
301 | location / { | 301 | location / { |
302 | # default index file when no file URI is requested | 302 | # default index file when no file URI is requested |
303 | index index.php; | 303 | index index.php; |
304 | try_files $uri /index.php$is_args$args; | 304 | try_files _ /index.php$is_args$args; |
305 | } | 305 | } |
306 | 306 | ||
307 | location ~ (index)\.php$ { | 307 | location ~ (index)\.php$ { |
@@ -314,23 +314,7 @@ server { | |||
314 | include fastcgi.conf; | 314 | include fastcgi.conf; |
315 | } | 315 | } |
316 | 316 | ||
317 | location ~ \.php$ { | 317 | location ~ /doc/html/ { |
318 | # deny access to all other PHP scripts | ||
319 | # disable this if you host other PHP applications on the same virtualhost | ||
320 | deny all; | ||
321 | } | ||
322 | |||
323 | location ~ /\. { | ||
324 | # deny access to dotfiles | ||
325 | deny all; | ||
326 | } | ||
327 | |||
328 | location ~ ~$ { | ||
329 | # deny access to temp editor files, e.g. "script.php~" | ||
330 | deny all; | ||
331 | } | ||
332 | |||
333 | location ~ /doc/ { | ||
334 | default_type "text/html"; | 318 | default_type "text/html"; |
335 | try_files $uri $uri/ $uri.html =404; | 319 | try_files $uri $uri/ $uri.html =404; |
336 | } | 320 | } |
@@ -341,13 +325,12 @@ server { | |||
341 | } | 325 | } |
342 | 326 | ||
343 | # allow client-side caching of static files | 327 | # allow client-side caching of static files |
344 | location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { | 328 | location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|oet|woff2?)$ { |
345 | expires max; | 329 | expires max; |
346 | add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | 330 | add_header Cache-Control "public, must-revalidate, proxy-revalidate"; |
347 | # HTTP 1.0 compatibility | 331 | # HTTP 1.0 compatibility |
348 | add_header Pragma public; | 332 | add_header Pragma public; |
349 | } | 333 | } |
350 | |||
351 | } | 334 | } |
352 | ``` | 335 | ``` |
353 | 336 | ||