Recipe nginx umi-cache
Материал из DiPHOST.Ru wiki system
(Различия между версиями)
Schors (Обсуждение | вклад) |
Schors (Обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
- | + | ||
server { | server { | ||
Строка 13: | Строка 13: | ||
open_file_cache_errors on; | open_file_cache_errors on; | ||
- | %%hosts%% | + | %%hosts%% |
access_log off; | access_log off; | ||
+ | log_not_found off; | ||
+ | |||
root %%sitedir%%/public_html; | root %%sitedir%%/public_html; | ||
+ | index index.html; | ||
+ | disable_symlinks if_not_owner from=%%sitedir%%/public_html; | ||
location / { | location / { | ||
access_log %%sitedir%%/logs/nginx-access.log; | access_log %%sitedir%%/logs/nginx-access.log; | ||
- | |||
charset utf-8; | charset utf-8; | ||
source_charset utf-8; | source_charset utf-8; | ||
Строка 30: | Строка 33: | ||
try_files $uri/index.html @apache; | try_files $uri/index.html @apache; | ||
} | } | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- |
Версия 12:03, 31 июля 2012
server { include listen.conf; include crawler.conf; proxy_buffer_size %%hsize%%k; client_max_body_size %%usize%%m; client_body_buffer_size 512k;
open_file_cache max=1000 inactive=20s; open_file_cache_valid 30s; open_file_cache_min_uses 2; open_file_cache_errors on;
%%hosts%%
access_log off; log_not_found off;
root %%sitedir%%/public_html; index index.html; disable_symlinks if_not_owner from=%%sitedir%%/public_html;
location / { access_log %%sitedir%%/logs/nginx-access.log; charset utf-8; source_charset utf-8; error_page 412 = @apache; if ($request_method = 'POST') { return 412; } if ($is_args = '?') { return 412; } if ($cookie_umicms_session) { return 412; } root %%sitedir%%/public_html/sys-temp/static-cache/$host/; try_files $uri/index.html @apache; }