Recipe nginx umi-cache

Материал из DiPHOST.Ru wiki system

(Различия между версиями)
Перейти к: навигация, поиск
Строка 1: Строка 1:
-
<source lang="icl">
+
 
         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;
-
                        disable_symlinks if_not_owner from=%%sitedir%%/public_html;
 
                         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;
                 }
                 }
-
 
-
                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%%;
 
-
                }
 
-
               
 
-
        }     
 
-
 
-
 
-
</source>
 

Версия 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;
               }
Личные инструменты
© 2006 — ООО «Дремучий лес»
Служба техподдержки: support@diphost.ru
Тексты этого сайта являются полностью оригинальными
или оригинальными компиляциями ООО «Дремучий Лес».
Распространяются по лицензии WTFPL
Отзывы о хостинге diphost.ru Отзывы на hostobzor.ru