nginx/redirect,secure

This commit is contained in:
Marc Beninca 2019-08-06 20:18:09 +02:00
parent 779ad581bb
commit 8d9e58eb7c

View file

@ -309,25 +309,47 @@ Prepare a grub.cfg
Web Web
--- ---
Security
^^^^^^^^
* /etc/nginx/https.conf
::
listen 443 ssl http2;
listen [::]:443 ssl http2;
add_header Strict-Transport-Security "max-age=31557600; includeSubDomains; preload";
Sites Sites
^^^^^ ^^^^^
* /etc/nginx/sites-enabled/http
::
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://${host}${request_uri};
}
* /etc/nginx/sites-enabled/rwx.work
:: ::
ssl_certificate /etc/nginx/rwx.work/bundle.crt; ssl_certificate /etc/nginx/rwx.work/bundle.crt;
ssl_certificate_key /etc/nginx/rwx.work/key.pem; ssl_certificate_key /etc/nginx/rwx.work/key.pem;
server { server {
listen 443 ssl http2; include /etc/nginx/https.conf;
listen [::]:443 ssl http2;
server_name deb.rwx.work; server_name deb.rwx.work;
root /d/mirrors/apt-mirror/debian; root /d/mirrors/apt-mirror/debian;
autoindex on; autoindex on;
} }
server { server {
listen 443 default_server ssl http2; include /etc/nginx/https.conf;
listen [::]:443 default_server ssl http2;
server_name .rwx.work; server_name .rwx.work;
location / { location / {
proxy_pass http://10.0.0.1/; proxy_pass http://10.0.0.1/;