Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- listen [::]:80;
- server_name test.nl www.test.nl;
- # Redirect all traffic to SSL
- return 301 https://$server_name$request_uri;
- }
- server {
- location /nginx_status {
- stub_status on;
- access_log off;
- allow 127.0.0.1;
- allow ::1;
- deny all;
- }
- location / {
- rewrite ^/dealer /admin permanent;
- rewrite ^/sitemap\.xml$ /webshops/sitemap permanent;
- rewrite ^/vesta-vuurwerk(?!/products/out_of_stock) http://vestavuurwerk.nl/?referrer=$http_host$request_uri permanent;
- try_files $uri $uri/ /index.php?$args;
- }
- location /admin/dealer_orders/pick_list {
- return 302 http://www.test.nl$request_uri;
- }
- location ~* (\.(png|jpg|jpeg))/$ {
- rewrite ^/(.*)/$ /$1 permanent;
- }
- location ~* \.(png|jpg|jpeg)$ {
- rewrite ^/uploads/location-online-folder/(\d+)/files/shot.png$ /static/folder/files/shot.png;
- rewrite ^/uploads/location-online-folder/(\d+)/files/extfile/(.*)$ /static/folder/files/extfile/$2;
- rewrite ^/uploads/location-online-folder/(\d+)/style/(.*)$ /static/folder/style/$2;
- expires max;
- }
- location ~* \.(eot|svg|ttf|woff)$ {
- expires max;
- }
- location ~* \.(css|js)$ {
- rewrite ^/uploads/location-online-folder/(\d+)/files/search/(.*)$ /static/folder/files/search/$2;
- rewrite ^/uploads/location-online-folder/(\d+)/javascript/(.*)$ /static/folder/javascript/$2;
- rewrite ^/uploads/location-online-folder/(\d+)/style/(.*)$ /static/folder/style/$2;
- expires max;
- }
- listen [::]:443 ssl http2 default_server;
- listen 443 ssl http2 default_server; # managed by Certbot
- ssl_certificate /etc/letsencrypt/live/test.nl/fullchain.pem; # managed by Certbot
- ssl_certificate_key /etc/letsencrypt/live/test.nl/privkey.pem; # managed by Certbot
- include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
- ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
- server_name test.nl www.test.nl;
- root /home/deploy/caff/www/;
- index index.php index.html;
- error_log /home/deploy/caff/error.log error;
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_index index.php;
- fastcgi_pass unix:/run/php/php7.1-fpm.sock;
- fastcgi_param SCRIPT_FILENAME /home/deploy/test/www/index.php;
- fastcgi_param SCRIPT_NAME /home/deploy/test/www/index.php;
- include /etc/nginx/fastcgi_params;
- fastcgi_read_timeout 3600s;
- proxy_intercept_errors on;
- fastcgi_intercept_errors on;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement