From c775f2aa873bef58e832a031cc5ad8b1a55c0eab Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Mon, 25 Feb 2019 18:51:58 +0000 Subject: [PATCH] initial commit --- etc/nginx/sites-available/marcleopold | 54 +++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 etc/nginx/sites-available/marcleopold diff --git a/etc/nginx/sites-available/marcleopold b/etc/nginx/sites-available/marcleopold new file mode 100644 index 0000000..8f92c50 --- /dev/null +++ b/etc/nginx/sites-available/marcleopold @@ -0,0 +1,54 @@ +server { + + server_name cms.marcleopold.isnet.uk; + + location / { + proxy_buffering off; + proxy_redirect http:://127.0.0.1:3004/ /; + proxy_pass http://127.0.0.1:3004/; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + } + + listen [::]:443 ssl ipv6only=on; # managed by Certbot + listen 443 ssl; # managed by Certbot + ssl_certificate /etc/letsencrypt/live/cms.marcleopold.isnet.uk/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/cms.marcleopold.isnet.uk/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 { + if ($host = cms.marcleopold.isnet.uk) { + return 301 https://$host$request_uri; + } # managed by Certbot + + + listen 80; + listen [::]80; + + server_name cms.marcleopold.isnet.uk; + return 404; # managed by Certbot +} + +server { + listen 80; + listen [::]80; + + server_name marcleopold.isnet.uk; + + location / { + proxy_buffering off; + proxy_redirect http:://127.0.0.1:3003/ /; + proxy_pass http://127.0.0.1:3003/; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + } + +}