Guest User

wordpress2.stpl

a guest
Oct 27th, 2020
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.16 KB | None | 0 0
  1. server {
  2.     listen      %ip%:%web_ssl_port% ssl http2;
  3.     server_name %domain_idn% %alias_idn%;
  4.     if ($host ~* www\.(.*)) {
  5.     set $host_without_www $1;
  6.     rewrite ^(.*)$ http://$host_without_www$1 permanent;
  7.     }
  8.     root        %docroot%;
  9.     index       index.php index.html index.htm;
  10.     access_log  /var/log/nginx/domains/%domain%.log combined;
  11.     access_log  /var/log/nginx/domains/%domain%.bytes bytes;
  12.     error_log   /var/log/nginx/domains/%domain%.error.log error;
  13.  
  14.     ssl_certificate      %ssl_pem%;
  15.     ssl_certificate_key  %ssl_key%;
  16.     ssl_stapling on;
  17.     ssl_stapling_verify on;
  18.     add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
  19.  
  20.     location = /favicon.ico {
  21.         log_not_found off;
  22.         access_log off;
  23.     }
  24.  
  25.     location = /robots.txt {
  26.         allow all;
  27.         log_not_found off;
  28.         access_log off;
  29.     }
  30.  
  31.     location / {
  32.         try_files $uri $uri/ /index.php?$args;
  33.  
  34.         if (!-e $request_filename)
  35.         {
  36.             rewrite ^(.+)$ /index.php?q=$1 last;
  37.         }
  38.  
  39.         location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  40.             expires     max;
  41.             fastcgi_hide_header "Set-Cookie";
  42.         }
  43.  
  44.         location ~ [^/]\.php(/|$) {
  45.             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  46.             if (!-f $document_root$fastcgi_script_name) {
  47.                 return  404;
  48.             }
  49.  
  50.             fastcgi_pass    %backend_lsnr%;
  51.             fastcgi_index   index.php;
  52.             include         /etc/nginx/fastcgi_params;
  53.         }
  54.     }
  55.  
  56.     location /error/ {
  57.         alias   %home%/%user%/web/%domain%/document_errors/;
  58.     }
  59.  
  60.     location ~* "/\.(htaccess|htpasswd)$" {
  61.         deny    all;
  62.         return  404;
  63.     }
  64.  
  65.     location /vstats/ {
  66.         alias   %home%/%user%/web/%domain%/stats/;
  67.         include %home%/%user%/web/%domain%/stats/auth.conf*;
  68.     }
  69.  
  70.     include     /etc/nginx/conf.d/phpmyadmin.inc*;
  71.     include     /etc/nginx/conf.d/phppgadmin.inc*;
  72.     include     /etc/nginx/conf.d/webmail.inc*;
  73.  
  74.     include     %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  75. }
Add Comment
Please, Sign In to add comment