Recipe nginx umi-cache
Материал из DiPHOST.Ru wiki system
(Различия между версиями)
Schors (Обсуждение | вклад) |
Schors (Обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
- | <source lang=" | + | <source lang="yaiff"> |
server { | server { |
Версия 15:00, 30 июля 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; root %%sitedir%%/public_html; location / { access_log %%sitedir%%/logs/nginx-access.log; disable_symlinks if_not_owner from=%%sitedir%%/public_html; 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; } location ~ /\.svn { deny all; log_not_found off; access_log off; } location ~ /\.git { deny all; log_not_found off; access_log off; } location ~ /\.ht { deny all; log_not_found off; access_log off; } location ~* ^/admin { error_page 412 = @apache; return 412; } location ~* \.php$ { error_page 412 = @apache; return 412; } location ~* \.(swf|zip|rar|arj|cab|exe|dll|ico|jpg|jpeg|gif|bmp|png|mp3|avi|mov|mpg|mpeg|amr|mmf|wml|wbmp|mid|midi|3gp|css|js|html|htm|txt)$ { access_log %%sitedir%%/logs/nginx-access.log; disable_symlinks if_not_owner from=%%sitedir%%/public_html; charset utf-8; source_charset utf-8; try_files $uri @apache; } location @apache { proxy_pass http://127.0.0.1:%%port%%; } }