Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Компьютеры » В помощь системному администратору » Nginx

Модерирует : lynx, Crash_Master, dg, emx, ShriEkeR

 Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

Открыть новую тему     Написать ответ в эту тему

ginger



Рыжик
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору

server {
    access_log /var/log/nginx/nod32mirror-access.log main buffer=1m flush=10s;
    error_log /var/log/nginx/nod32mirror-error.log error;
   #limit_req zone=req_limit_per_ip burst=50 nodelay;
   #limit_conn conn_limit_per_ip 64;
    listen 8081 default_server reuseport;
    root /var/www/nod32mirror;
    server_name av.intranet;
    index index.html;
    autoindex on;
 
    location ~* (?:^|/)\. {
      deny all;
    }
 
    location ~ /(?:favicon.ico|apple-touch-icon(|-\d+x\d+)(|-precomposed).png)$ {
      return 204;
      expires 4w;
    }
 
    location ~* \.(?:txt|ver)(\?.*)?$ {
      tcp_nodelay off;
      open_file_cache max=1000 inactive=120s;
      open_file_cache_valid 45s;
      open_file_cache_min_uses 2;
      open_file_cache_errors off;
      gzip_static on;
      expires -1;
    }
 
    location ~ \.nup$ {
      auth_basic "Restricted Area";
      auth_basic_user_file /var/www/.htpasswd;
      tcp_nodelay off;
      open_file_cache max=1000 inactive=120s;
      open_file_cache_valid 45s;
      open_file_cache_min_uses 2;
      open_file_cache_errors off;
      expires -1;
    }
 
    location / {
         limit_except GET POST {
            deny all;
         }
    }
 
    location ~ /(nginx-logo|poweredby).png$ {
      root /usr/share/nginx/html;
      tcp_nodelay off;
      open_file_cache max=1000 inactive=120s;
      open_file_cache_valid 45s;
      open_file_cache_min_uses 2;
      open_file_cache_errors off;
      expires 8w;
    }
 
    error_page 404 /404.html;
      location = /404.html {
        root /usr/share/nginx/html;
    }
 
    error_page 500 502 503 504 /50x.html;
      location = /50x.html {
        root /usr/share/nginx/html;
    }
}

Всего записей: 854 | Зарегистр. 03-09-2001 | Отправлено: 10:41 20-01-2020
Открыть новую тему     Написать ответ в эту тему

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Компьютеры » В помощь системному администратору » Nginx


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru