Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- server_name autocode.stdpr.ru; # managed by Certbot
- root /usr/share/nginx/html;
- location / {
- proxy_pass http://172.20.255.189:8080;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- # no way back to the http-version of the site
- add_header Strict-Transport-Security "max-age=31536000";
- # explicitly fix all the http pictures
- add_header Content-Security-Policy "img-src https: data: blob:; upgrade-insecure-requests";
- }
- error_page 404 /404.html;
- location = /40x.html {
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- }
- listen [::]:443 ssl; # managed by Certbot
- listen 443 ssl; # managed by Certbot
- ssl_certificate /usr/local/etc/letsencrypt/live/autocode.stdpr.ru/fullchain.pem; # managed by Certbot
- ssl_certificate_key /usr/local/etc/letsencrypt/live/autocode.stdpr.ru/privkey.pem; # managed by Certbot
- include /usr/local/etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
- ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
- }
- server {
- if ($host = autocode.stdpr.ru) {
- return 301 https://$host$request_uri;
- } # managed by Certbot
- listen 80 ;
- listen [::]:80 ;
- server_name autocode.stdpr.ru;
- return 404; # managed by Certbot
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement