daily pastebin goal
81%
SHARE
TWEET

Untitled

a guest May 16th, 2018 91 in 9 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
  2. nginx: configuration file /etc/nginx/nginx.conf test is successful
  3. # configuration file /etc/nginx/nginx.conf:
  4.  
  5. user  apache;
  6. worker_processes  12;
  7. worker_rlimit_nofile 30000;
  8.  
  9. error_log  /var/log/nginx/error.log warn;
  10. pid        /var/run/nginx.pid;
  11.  
  12.  
  13. events {
  14.     worker_connections  1024;
  15. }
  16.  
  17.  
  18. http {
  19.     include       /etc/nginx/mime.types;
  20.     default_type  application/octet-stream;
  21.  
  22.     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  23.                       '$status $body_bytes_sent "$http_referer" '
  24.                       '"$http_user_agent" "$http_x_forwarded_for"';
  25.  
  26.     access_log  /var/log/nginx/access.log  main;
  27.  
  28. large_client_header_buffers 16 32k;
  29. proxy_max_temp_file_size 0;
  30. proxy_buffer_size 256k;
  31. proxy_buffers 16 256k;
  32. proxy_busy_buffers_size 256k;
  33.  
  34.     sendfile        on;
  35.     #tcp_nopush     on;
  36.  
  37.     keepalive_timeout  65;
  38.  
  39.     #gzip  on;
  40.  
  41.     include /etc/nginx/conf.d/*.conf;
  42.     include /etc/nginx/vhosts/*/*.conf;
  43. server {
  44.         server_name localhost;
  45.  disable_symlinks if_not_owner;
  46.     listen 80;
  47.     include /etc/nginx/vhosts-includes/*.conf;
  48.     location @fallback {
  49.         proxy_connect_timeout 600;
  50.         proxy_read_timeout 600;
  51.         proxy_send_timeout 600;
  52.         send_timeout 600;
  53.         error_log /dev/null crit;
  54.         proxy_pass http://127.0.0.1:8080;
  55.         proxy_redirect http://127.0.0.1:8080 /;
  56.         proxy_set_header Host $host;
  57.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  58.         proxy_set_header X-Forwarded-Proto $scheme;
  59.         access_log off ;
  60.     }
  61.     }
  62.     client_max_body_size 128m;
  63. }
  64.  
  65. # configuration file /etc/nginx/mime.types:
  66.  
  67. types {
  68.     text/html                             html htm shtml;
  69.     text/css                              css;
  70.     text/xml                              xml;
  71.     image/gif                             gif;
  72.     image/jpeg                            jpeg jpg;
  73.     application/javascript                js;
  74.     application/atom+xml                  atom;
  75.     application/rss+xml                   rss;
  76.  
  77.     text/mathml                           mml;
  78.     text/plain                            txt;
  79.     text/vnd.sun.j2me.app-descriptor      jad;
  80.     text/vnd.wap.wml                      wml;
  81.     text/x-component                      htc;
  82.  
  83.     image/png                             png;
  84.     image/tiff                            tif tiff;
  85.     image/vnd.wap.wbmp                    wbmp;
  86.     image/x-icon                          ico;
  87.     image/x-jng                           jng;
  88.     image/x-ms-bmp                        bmp;
  89.     image/svg+xml                         svg svgz;
  90.     image/webp                            webp;
  91.  
  92.     application/font-woff                 woff;
  93.     application/java-archive              jar war ear;
  94.     application/json                      json;
  95.     application/mac-binhex40              hqx;
  96.     application/msword                    doc;
  97.     application/pdf                       pdf;
  98.     application/postscript                ps eps ai;
  99.     application/rtf                       rtf;
  100.     application/vnd.apple.mpegurl         m3u8;
  101.     application/vnd.ms-excel              xls;
  102.     application/vnd.ms-fontobject         eot;
  103.     application/vnd.ms-powerpoint         ppt;
  104.     application/vnd.wap.wmlc              wmlc;
  105.     application/vnd.google-earth.kml+xml  kml;
  106.     application/vnd.google-earth.kmz      kmz;
  107.     application/x-7z-compressed           7z;
  108.     application/x-cocoa                   cco;
  109.     application/x-java-archive-diff       jardiff;
  110.     application/x-java-jnlp-file          jnlp;
  111.     application/x-makeself                run;
  112.     application/x-perl                    pl pm;
  113.     application/x-pilot                   prc pdb;
  114.     application/x-rar-compressed          rar;
  115.     application/x-redhat-package-manager  rpm;
  116.     application/x-sea                     sea;
  117.     application/x-shockwave-flash         swf;
  118.     application/x-stuffit                 sit;
  119.     application/x-tcl                     tcl tk;
  120.     application/x-x509-ca-cert            der pem crt;
  121.     application/x-xpinstall               xpi;
  122.     application/xhtml+xml                 xhtml;
  123.     application/xspf+xml                  xspf;
  124.     application/zip                       zip;
  125.  
  126.     application/octet-stream              bin exe dll;
  127.     application/octet-stream              deb;
  128.     application/octet-stream              dmg;
  129.     application/octet-stream              iso img;
  130.     application/octet-stream              msi msp msm;
  131.  
  132.     application/vnd.openxmlformats-officedocument.wordprocessingml.document    docx;
  133.     application/vnd.openxmlformats-officedocument.spreadsheetml.sheet          xlsx;
  134.     application/vnd.openxmlformats-officedocument.presentationml.presentation  pptx;
  135.  
  136.     audio/midi                            mid midi kar;
  137.     audio/mpeg                            mp3;
  138.     audio/ogg                             ogg;
  139.     audio/x-m4a                           m4a;
  140.     audio/x-realaudio                     ra;
  141.  
  142.     video/3gpp                            3gpp 3gp;
  143.     video/mp2t                            ts;
  144.     video/mp4                             mp4;
  145.     video/mpeg                            mpeg mpg;
  146.     video/quicktime                       mov;
  147.     video/webm                            webm;
  148.     video/x-flv                           flv;
  149.     video/x-m4v                           m4v;
  150.     video/x-mng                           mng;
  151.     video/x-ms-asf                        asx asf;
  152.     video/x-ms-wmv                        wmv;
  153.     video/x-msvideo                       avi;
  154. }
  155.  
  156. # configuration file /etc/nginx/conf.d/isplimitreq.conf:
  157. limit_req_zone $binary_remote_addr zone=rulate.ru:1920k rate=30r/s;
  158. limit_req_zone $binary_remote_addr zone=tl.rulate.ru:1280k rate=20r/s;
  159.  
  160. # configuration file /etc/nginx/vhosts/kentus/tl.rulate.ru.conf:
  161. server {
  162.     server_name tl.rulate.ru www.tl.rulate.ru;
  163.     charset off;
  164.     index index.html index.php;
  165.     disable_symlinks if_not_owner from=$root_path;
  166.     include /etc/nginx/vhosts-includes/*.conf;
  167.     include /etc/nginx/vhosts-resources/tl.rulate.ru/*.conf;
  168.     access_log /var/www/httpd-logs/tl.rulate.ru.access.log;
  169.     error_log /var/www/httpd-logs/tl.rulate.ru.error.log notice;
  170.     ssi on;
  171.     set $root_path /var/www/kentus/data/www/tl.rulate.ru;
  172.     root $root_path;
  173.     listen 87.117.247.92:80;
  174.         large_client_header_buffers 16 32k;
  175.     location / {
  176.         location ~ [^/]\.ph(p\d*|tml)$ {
  177.             try_files /does_not_exists @fallback;
  178.         }
  179.         location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
  180.             try_files $uri $uri/ @fallback;
  181.             expires 3d;
  182.         }
  183.         location / {
  184.             try_files /does_not_exists @fallback;
  185.         }
  186.     }
  187.     location @fallback {
  188.         proxy_connect_timeout 600;
  189.         proxy_read_timeout 600;
  190.         proxy_send_timeout 600;
  191.         send_timeout 600;
  192.         proxy_buffer_size   256k;
  193.         proxy_buffers   16 256k;
  194.         proxy_busy_buffers_size   256k;
  195.         proxy_pass http://127.0.0.1:8080;
  196.         proxy_redirect http://127.0.0.1:8080 /;
  197.         proxy_set_header Host $host;
  198.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  199.         proxy_set_header X-Forwarded-Proto $scheme;
  200.         access_log off;
  201.     }
  202.     gzip on;
  203.     gzip_comp_level 9;
  204.     gzip_disable "msie6";
  205.     gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
  206. }
  207. server {
  208.     server_name tl.rulate.ru www.tl.rulate.ru;
  209.     ssl on;
  210.     ssl_certificate "/var/www/httpd-cert/kentus/rulate.ru.crtca";
  211.     ssl_certificate_key "/var/www/httpd-cert/kentus/rulate.ru.key";
  212.     ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
  213.     ssl_prefer_server_ciphers on;
  214.     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  215.     add_header Strict-Transport-Security "max-age=31536000;";
  216.     charset off;
  217.     index index.html index.php;
  218.     disable_symlinks if_not_owner from=$root_path;
  219.     include /etc/nginx/vhosts-includes/*.conf;
  220.     include /etc/nginx/vhosts-resources/tl.rulate.ru/*.conf;
  221.     access_log /var/www/httpd-logs/tl.rulate.ru.access.log;
  222.     error_log /var/www/httpd-logs/tl.rulate.ru.error.log notice;
  223.     ssi on;
  224.     set $root_path /var/www/kentus/data/www/tl.rulate.ru;
  225.     root $root_path;
  226.     listen 87.117.247.92:443;
  227.     gzip on;
  228.     gzip_comp_level 9;
  229.     gzip_disable "msie6";
  230.     gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
  231.     location / {
  232.         location ~ [^/]\.ph(p\d*|tml)$ {
  233.             try_files /does_not_exists @fallback;
  234.         }
  235.         location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
  236.             expires 3d;
  237.             try_files $uri $uri/ @fallback;
  238.         }
  239.         location / {
  240.             try_files /does_not_exists @fallback;
  241.         }
  242.     }
  243.     location @fallback {
  244.         proxy_pass http://127.0.0.1:8080;
  245.         proxy_redirect http://127.0.0.1:8080 /;
  246.         proxy_set_header Host $host;
  247.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  248.         proxy_set_header X-Forwarded-Proto $scheme;
  249.         access_log off;
  250.     }
  251. }
  252. # configuration file /etc/nginx/vhosts-includes/awstats.conf:
  253. location /awstatsicons/ {
  254.     alias /usr/share/awstats/wwwroot/icon/;
  255. }
  256.  
  257. # configuration file /etc/nginx/vhosts-includes/blacklist-nginx.conf:
  258.     location @blacklist {
  259.     proxy_redirect off ;
  260.     proxy_pass https://87.117.247.92:1500;
  261.     rewrite (.*) /mancgi/ddos break;
  262.         proxy_set_header Host $host;
  263.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  264.         proxy_set_header X-Forwarded-Proto $scheme;
  265.         proxy_set_header X_ISP_FIREWALLSEC 2abad75a43a961b4739f477757ab8b169e01b85a59ac15359c2df4c46e69d59824adf26756541bc9f362404b0ecc61accd1a0626c61b5b62485026b7b9fc4fdda94244ff965fc889c208d4d0d4367ca15082c8169e2378e6739f9d2d9bed0a442f4f43c5ae0b4e70132340e859bc89a93f51bfdd7537c3e8d66115714e20b57d;
  266.     }
  267.  
  268. # configuration file /etc/nginx/vhosts-includes/disabled.conf:
  269. location /disabled/ {
  270.     alias /usr/local/mgr5/www/disabled/;
  271. }
  272.  
  273. # configuration file /etc/nginx/vhosts-includes/munin.conf:
  274. #location /munin/static/ {
  275. #        alias /etc/munin/static/;
  276. #        expires modified +1w;
  277. #    }
  278.  
  279.  
  280. location ^~ /munin {
  281.         auth_basic            "Restricted";
  282.         auth_basic_user_file  /etc/munin/munin-htpasswd;
  283.         alias /var/www/html/munin/;
  284.         expires modified +310s;
  285.         }
  286.        
  287. #location ^~ /munin-cgi/munin-cgi-graph/ {
  288. #    access_log off;
  289. #    fastcgi_split_path_info ^(/munin-cgi/munin-cgi-graph)(.*);
  290. #    fastcgi_param PATH_INFO $fastcgi_path_info;
  291. #    fastcgi_pass unix:/run/munin/fcgi-graph.sock;
  292. #    include fastcgi_params;
  293. #    }        
  294.    
  295.     location ^~ /munin-cgi-graph/ {
  296.     fastcgi_split_path_info ^(/munin-cgi-graph)(.*);
  297.     fastcgi_param PATH_INFO $fastcgi_path_info;
  298.     fastcgi_pass unix:/run/munin/munin-cgi-graph.sock;
  299.     include fastcgi_params;
  300.     }
  301.    
  302.     location ^~ /nginx_status {
  303.             stub_status on;
  304.             access_log   off;
  305.             allow 127.0.0.1;
  306.             deny all;
  307. }
  308.  
  309. # configuration file /etc/nginx/fastcgi_params:
  310.  
  311. fastcgi_param  QUERY_STRING       $query_string;
  312. fastcgi_param  REQUEST_METHOD     $request_method;
  313. fastcgi_param  CONTENT_TYPE       $content_type;
  314. fastcgi_param  CONTENT_LENGTH     $content_length;
  315.  
  316. fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
  317. fastcgi_param  REQUEST_URI        $request_uri;
  318. fastcgi_param  DOCUMENT_URI       $document_uri;
  319. fastcgi_param  DOCUMENT_ROOT      $document_root;
  320. fastcgi_param  SERVER_PROTOCOL    $server_protocol;
  321. fastcgi_param  REQUEST_SCHEME     $scheme;
  322. fastcgi_param  HTTPS              $https if_not_empty;
  323.  
  324. fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
  325. fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
  326.  
  327. fastcgi_param  REMOTE_ADDR        $remote_addr;
  328. fastcgi_param  REMOTE_PORT        $remote_port;
  329. fastcgi_param  SERVER_ADDR        $server_addr;
  330. fastcgi_param  SERVER_PORT        $server_port;
  331. fastcgi_param  SERVER_NAME        $server_name;
  332.  
  333. # PHP only, required if PHP was built with --enable-force-cgi-redirect
  334. fastcgi_param  REDIRECT_STATUS    200;
  335. fastcgi_param  SCRIPT_FILENAME    $request_filename;
  336.  
  337. # configuration file /etc/nginx/vhosts-includes/phpmyadmin.conf:
  338. location /phpmyadmin {
  339.     alias /usr/share/phpMyAdmin;
  340.     index index.php;
  341. }
  342. location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
  343.     alias /usr/share/phpMyAdmin/$1;
  344.     error_page 404 @apache;
  345. }
  346. location ~ ^/phpmyadmin/(.+\.php)$ {
  347.     alias /usr/share/phpMyAdmin/$1;
  348.     fastcgi_pass unix:/var/run/php-fpm.apache.sock;
  349.     fastcgi_index index.php;
  350.     fastcgi_param SCRIPT_FILENAME $request_filename;
  351.     include fastcgi_params;
  352.     error_page 502 = @apache;
  353.     error_page 404 = @apache;
  354. }
  355. location @apache {
  356.     error_log /dev/null crit;
  357.     proxy_pass http://127.0.0.1:8080;
  358.     proxy_redirect http://127.0.0.1:8080 /;
  359.     proxy_set_header Host $host;
  360.     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  361.     proxy_set_header X-Forwarded-Proto $scheme;
  362. }
  363.  
  364. location ^~ /phpmyadmin/setup {
  365.     deny all;
  366. }
  367.  
  368. # configuration file /etc/nginx/vhosts-includes/phppgadmin.conf:
  369. location /phppgadmin {
  370.     alias /usr/share/phpPgAdmin;
  371.     index index.php;
  372. }
  373. location ~* ^/phppgadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
  374.     alias /usr/share/phpPgAdmin/$1;
  375.     error_page 404 @apache;
  376. }
  377. location ~ ^/phppgadmin/(.+\.php)$ {
  378.     alias /usr/share/phpPgAdmin/$1;
  379.     fastcgi_pass unix:/var/run/php-fpm.apache.sock;
  380.     fastcgi_index index.php;
  381.     fastcgi_param SCRIPT_FILENAME $request_filename;
  382.     include fastcgi_params;
  383.     error_page 502 = @apache;
  384.     error_page 404 = @apache;
  385. }
  386. location @apache {
  387.     error_log /dev/null crit;
  388.     proxy_pass http://127.0.0.1:8080;
  389.     proxy_redirect http://127.0.0.1:8080 /;
  390.     proxy_set_header Host $host;
  391.     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  392.     proxy_set_header X-Forwarded-Proto $scheme;
  393. }
  394.  
  395.  
  396. # configuration file /etc/nginx/vhosts-includes/roundcube.conf:
  397. location /roundcube/ {
  398.     alias /usr/share/roundcubemail/;
  399.     index index.php;
  400.     error_page 404 @apache;
  401. }
  402. location ~ ^/roundcube/(.+\.php)$ {
  403.     alias /usr/share/roundcubemail/$1;
  404.     fastcgi_pass unix:/var/run/php-fpm.apache.sock;
  405.     fastcgi_index index.php;
  406.     fastcgi_param SCRIPT_FILENAME $request_filename;
  407.     fastcgi_param PHP_FLAG "display_errors=on \n display_startup_errors=on";
  408.     fastcgi_param PHP_VALUE "error_reporting=-1";
  409.     include fastcgi_params;
  410.     error_page 502 = @apache;
  411.     error_page 404 = @apache;
  412. }
  413. location @apache {
  414.     error_log /dev/null crit;
  415.     proxy_pass http://127.0.0.1:8080;
  416.     proxy_redirect http://127.0.0.1:8080 /;
  417.     proxy_set_header Host $host;
  418.     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  419.     proxy_set_header X-Forwarded-Proto $scheme;
  420. }
  421.  
  422. # configuration file /etc/nginx/vhosts-resources/tl.rulate.ru/reqlimit.conf:
  423. limit_req zone=tl.rulate.ru burst=20;
  424. error_page 503 =429 @blacklist;
  425.  
  426. # configuration file /etc/nginx/vhosts/www-root/rulate.ru.conf:
  427. server {
  428.     server_name rulate.ru www.rulate.ru;
  429.     charset off;
  430.     index index.html index.php;
  431.     disable_symlinks if_not_owner from=$root_path;
  432.     include /etc/nginx/vhosts-includes/*.conf;
  433.     include /etc/nginx/vhosts-resources/rulate.ru/*.conf;
  434.     access_log /var/www/httpd-logs/rulate.ru.access.log;
  435.     error_log /var/www/httpd-logs/rulate.ru.error.log notice;
  436.     ssi on;
  437.     set $root_path /var/www/www-root/data/www/rulate.ru;
  438.     root $root_path;
  439.     listen 87.117.247.92:80;
  440.     location / {
  441.         location ~ [^/]\.ph(p\d*|tml)$ {
  442.             try_files /does_not_exists @fallback;
  443.         }
  444.         location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
  445.             try_files $uri $uri/ @fallback;
  446.         }
  447.         location / {
  448.             try_files /does_not_exists @fallback;
  449.         }
  450.     }
  451.     location @fallback {
  452.         proxy_connect_timeout 600;
  453.         proxy_read_timeout 600;
  454.         proxy_send_timeout 600;
  455.         send_timeout 600;
  456.         proxy_buffer_size   256k;
  457.         proxy_buffers   16 256k;
  458.         proxy_busy_buffers_size   256k;
  459.         proxy_pass http://127.0.0.1:8080;
  460.         proxy_redirect http://127.0.0.1:8080 /;
  461.         proxy_set_header Host $host;
  462.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  463.         proxy_set_header X-Forwarded-Proto $scheme;
  464.         access_log off;
  465.     }
  466.     rewrite ^/(.*)$ http://tl.rulate.ru permanent;
  467. }
  468.  
  469. # configuration file /etc/nginx/vhosts-resources/rulate.ru/reqlimit.conf:
  470. limit_req zone=rulate.ru burst=30;
  471. error_page 503 =429 @blacklist;
RAW Paste Data
Top