Advertisement
Guest User

Untitled

a guest
Oct 27th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 3.05 KB | None | 0 0
  1.     server {
  2.         listen 80;
  3.         listen [::]:80;
  4.         server_name test.nl www.test.nl;
  5.  
  6.         # Redirect all traffic to SSL
  7.         return 301 https://$server_name$request_uri;
  8.  
  9.     }
  10.  
  11.     server {
  12.  
  13.         location /nginx_status {
  14.             stub_status on;
  15.             access_log off;
  16.             allow 127.0.0.1;
  17.             allow ::1;
  18.             deny all;
  19.         }
  20.  
  21.         location / {
  22.             rewrite ^/dealer /admin permanent;
  23.             rewrite ^/sitemap\.xml$ /webshops/sitemap permanent;
  24.             rewrite ^/vesta-vuurwerk(?!/products/out_of_stock) http://vestavuurwerk.nl/?referrer=$http_host$request_uri permanent;
  25.             try_files $uri $uri/ /index.php?$args;
  26.         }
  27.  
  28.  
  29.          location /admin/dealer_orders/pick_list {
  30.              return 302 http://www.test.nl$request_uri;
  31.          }
  32.  
  33.          location ~* (\.(png|jpg|jpeg))/$ {
  34.              rewrite ^/(.*)/$ /$1 permanent;
  35.          }
  36.  
  37.          location ~* \.(png|jpg|jpeg)$ {
  38.               rewrite ^/uploads/location-online-folder/(\d+)/files/shot.png$ /static/folder/files/shot.png;
  39.               rewrite ^/uploads/location-online-folder/(\d+)/files/extfile/(.*)$ /static/folder/files/extfile/$2;
  40.               rewrite ^/uploads/location-online-folder/(\d+)/style/(.*)$ /static/folder/style/$2;
  41.               expires max;
  42.          }
  43.  
  44.          location ~* \.(eot|svg|ttf|woff)$ {
  45.               expires max;
  46.          }
  47.  
  48.          location ~* \.(css|js)$ {
  49.               rewrite ^/uploads/location-online-folder/(\d+)/files/search/(.*)$ /static/folder/files/search/$2;
  50.               rewrite ^/uploads/location-online-folder/(\d+)/javascript/(.*)$ /static/folder/javascript/$2;
  51.               rewrite ^/uploads/location-online-folder/(\d+)/style/(.*)$ /static/folder/style/$2;
  52.               expires max;
  53.          }
  54.  
  55.         listen              [::]:443 ssl http2 default_server;
  56.         listen              443 ssl http2 default_server;                           # managed by Certbot
  57.         ssl_certificate     /etc/letsencrypt/live/test.nl/fullchain.pem; # managed by Certbot
  58.         ssl_certificate_key /etc/letsencrypt/live/test.nl/privkey.pem;   # managed by Certbot
  59.         include             /etc/letsencrypt/options-ssl-nginx.conf;                # managed by Certbot
  60.         ssl_dhparam         /etc/letsencrypt/ssl-dhparams.pem;                      # managed by Certbot
  61.  
  62.         server_name test.nl www.test.nl;
  63.  
  64.         root /home/deploy/caff/www/;
  65.         index index.php index.html;
  66.         error_log /home/deploy/caff/error.log error;
  67.  
  68.         location ~ \.php$ {
  69.             fastcgi_split_path_info ^(.+\.php)(/.+)$;
  70.             fastcgi_index index.php;
  71.             fastcgi_pass unix:/run/php/php7.1-fpm.sock;
  72.             fastcgi_param SCRIPT_FILENAME /home/deploy/test/www/index.php;
  73.             fastcgi_param SCRIPT_NAME /home/deploy/test/www/index.php;
  74.             include /etc/nginx/fastcgi_params;
  75.             fastcgi_read_timeout 3600s;
  76.             proxy_intercept_errors on;
  77.             fastcgi_intercept_errors on;
  78.         }
  79.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement