Advertisement
Guest User

Untitled

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