Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- client_max_body_size 100M;
- listen 80;
- server_name f.com;
- location / {
- proxy_pass http://localhost:3005;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection 'upgrade';
- proxy_set_header Host $host;
- proxy_cache_bypass $http_upgrade;
- # First attempt to serve request as file, then
- # as directory, then fall back to displaying a 404.
- # try_files $uri $uri/ =404;
- }
- listen 443 ssl; # managed by Certbot
- ssl_certificate /etc/letsencrypt/live/f.com/fullchain.pem; # managed by Certbot
- ssl_certificate_key /etc/letsencrypt/live/f.com/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
- if ($scheme != "https") {
- return 301 https://$host$request_uri;
- } # managed by Certbot
- }
- server {
- listen 80;
- server_name s.com;
- location / {
- proxy_pass http://localhost:3006;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection 'upgrade';
- proxy_set_header Host $host;
- proxy_cache_bypass $http_upgrade;
- # First attempt to serve request as file, then
- # as directory, then fall back to displaying a 404.
- # try_files $uri $uri/ =404;
- # deny all;
- }
- listen 443 ssl; # managed by Certbot
- ssl_certificate /etc/letsencrypt/live/s.com/fullchain.pem; # managed by Certbot
- ssl_certificate_key /etc/letsencrypt/live/s.com/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
- # Redirect non-https traffic to https
- if ($scheme != "https") {
- return 301 https://$host$request_uri;
- } # managed by Certbot
- }
Add Comment
Please, Sign In to add comment