|
| 1 | +# server { |
| 2 | +# |
| 3 | +# include /etc/nginx/master/_listen/192.168.250.2/http.conf; |
| 4 | +# |
| 5 | +# include /etc/nginx/master/_static/errors.conf; |
| 6 | +# |
| 7 | +# root /usr/share/www/http-error-pages/sites/other; |
| 8 | +# |
| 9 | +# server_name blkcipher.info www.blkcipher.info; |
| 10 | +# |
| 11 | +# location / { |
| 12 | +# |
| 13 | +# return 301 https://$host$request_uri; |
| 14 | +# |
| 15 | +# } |
| 16 | +# |
| 17 | +# location ~ /\.well-known/acme-challenge { |
| 18 | +# |
| 19 | +# root /var/www; |
| 20 | +# |
| 21 | +# } |
| 22 | +# |
| 23 | +# access_log /var/log/nginx/domains/blkcipher.info/blkcipher.info-access.log main; |
| 24 | +# error_log /var/log/nginx/domains/blkcipher.info/blkcipher.info-error.log crit; |
| 25 | +# |
| 26 | +# } |
| 27 | + |
| 28 | +server { |
| 29 | + |
| 30 | + include /etc/nginx/master/_listen/192.168.250.2/https.conf; |
| 31 | + |
| 32 | + include /etc/nginx/master/_server/blkcipher.info/certs/blkcipher.info.conf; |
| 33 | + |
| 34 | + include /etc/nginx/master/_static/errors.conf; |
| 35 | + |
| 36 | + include /etc/nginx/master/_helpers/limits.conf; |
| 37 | + |
| 38 | + add_header Strict-Transport-Security "max-age=63072000; includeSubdomains" always; |
| 39 | + add_header X-XSS-Protection "1; mode=block" always; |
| 40 | + add_header X-Frame-Options "SAMEORIGIN" always; |
| 41 | + add_header Referrer-Policy "no-referrer"; |
| 42 | + add_header X-Content-Type-Options "nosniff" always; |
| 43 | + add_header Content-Security-Policy "default-src 'none'; script-src 'none'; img-src 'self'; style-src 'self' https://fonts.googleapis.com https://maxcdn.bootstrapcdn.com; font-src 'self' https://fonts.gstatic.com https://maxcdn.bootstrapcdn.com; object-src 'none'; frame-ancestors 'self'; base-uri 'self'; form-action 'self';"; |
| 44 | + add_header Feature-Policy "geolocation none; midi none; notifications none; push none; sync-xhr none; microphone none; camera none; magnetometer none; gyroscope none; speaker none; vibrate none; fullscreen self; payment none; usb none;"; |
| 45 | + |
| 46 | + root /usr/share/www/http-error-pages/sites/other; |
| 47 | + |
| 48 | + server_name blkcipher.info www.blkcipher.info; |
| 49 | + |
| 50 | + if ($host = www.blkcipher.info) { |
| 51 | + |
| 52 | + return 301 https://blkcipher.info$request_uri; |
| 53 | + |
| 54 | + } |
| 55 | + |
| 56 | + location / { |
| 57 | + |
| 58 | + # proxy_pass http://blkcipher_info_prod_backend; |
| 59 | + proxy_pass http://localhost:80; |
| 60 | + client_max_body_size 2m; |
| 61 | + |
| 62 | + } |
| 63 | + |
| 64 | + location ~ ^/(blog) { |
| 65 | + |
| 66 | + return 301 https://blkcipher.info; |
| 67 | + |
| 68 | + } |
| 69 | + |
| 70 | + location ~ /\.well-known/acme-challenge { |
| 71 | + |
| 72 | + root /var/www; |
| 73 | + |
| 74 | + } |
| 75 | + |
| 76 | + access_log /var/log/nginx/domains/blkcipher.info/blkcipher.info-access.log main; |
| 77 | + error_log /var/log/nginx/domains/blkcipher.info/blkcipher.info-error.log crit; |
| 78 | + |
| 79 | +} |
0 commit comments