Advertisement
Guest User

Untitled

a guest
Apr 28th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.92 KB | None | 0 0
  1. server {
  2.     listen                          80;
  3.     server_name                     ~^(www\.)?(?<domain>.+)$;
  4.     root                            /var/www/valhalla/$domain;
  5.     access_log                      /var/log/nginx/domain-access.log;
  6.     error_log                       /var/log/nginx/domain-error.log;
  7.     index                           index.php index.html;
  8.     rewrite_log                     on;
  9.    
  10.     error_page 404 /404.html;
  11.  
  12.  
  13.     if ($host != '$domain' ) {
  14.         rewrite                 ^/(.*)$  http://$domain/$1  permanent;
  15.     }
  16.  
  17.     location ~* ^/control/ {
  18.         root                            /var/www/sound.pixliapp.com;
  19.  
  20.     }
  21.  
  22.     location ~* ^/editor/ {
  23.         root                    /var/www/panel.pixli.ru/;
  24.  
  25.         location ~ \.php$ {
  26.             include                 fastcgi_params;
  27.             fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
  28.             fastcgi_pass    backend-valhalla;
  29.         }
  30.     }
  31.  
  32.     location ~* ^/admin/ {
  33.         root                    /var/www/user/;
  34.  
  35.         location ~ \.php$ {
  36.             include                 fastcgi_params;
  37.             fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
  38.             fastcgi_pass    backend-valhalla;
  39.         }
  40.     }
  41.    
  42.     location /index.html {
  43.         rewrite                 / / permanent;
  44.     }
  45.  
  46.     location ~ ^/(.*?)/index\.html$ {
  47.         rewrite                 ^/(.*?)/ // permanent;
  48.     }
  49.  
  50.     location ~ \.php$ {
  51.         include                 fastcgi_params;
  52.         fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
  53.         fastcgi_pass    backend-valhalla;
  54.     }
  55.     location ~* ^.+\.(jpg|jpeg|gif|png|ico|bmp)$ {
  56.         #access_log           off;
  57.         expires                      10d;
  58.         break;
  59.     }
  60.    
  61.     location ~* ^.+\.(css|js)$ {
  62.         #access_log           off;
  63.         charset utf-8;
  64.         expires                      epoch;
  65.         break;
  66.     }
  67.  
  68.     location ~ /\.ht {
  69.         deny                    all;
  70.     }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement