Guest User

wordpress2.tpl

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