96 lines
2.9 KiB
Plaintext
96 lines
2.9 KiB
Plaintext
server {
|
|
listen 80;
|
|
#listen [::]:80;
|
|
server_name ohc.solusar.de;
|
|
|
|
# Enforce HTTPS
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
#listen [::]:443 ssl http2;
|
|
server_name ohc.solusar.de;
|
|
|
|
#ssl on;
|
|
ssl_certificate /etc/letsencrypt/live/ohc.solusar.de/fullchain.pem;
|
|
ssl_trusted_certificate /etc/letsencrypt/live/ohc.solusar.de/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/ohc.solusar.de/privkey.pem;
|
|
|
|
ssl_dhparam /etc/myssl/dh4096.pem;
|
|
ssl_protocols TLSv1.2;
|
|
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK';
|
|
ssl_session_timeout 5m;
|
|
ssl_prefer_server_ciphers on;
|
|
ssl_session_cache shared:SSL:50m;
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
|
|
#add_header X-Frame-Options "SAMEORIGIN";
|
|
#add_header X-Content-Type-Options nosniff;
|
|
#add_header X-XSS-Protection "1; mode=block";
|
|
#add_header Content-Security-Policy "default-src 'none'; font-src 'self'; script-src 'self' 'unsafe-inline' https://nc.solusar.de; img-src * data:; object-src 'none'; style-src 'self' 'unsafe-inline' 'sha256-bQfd5MwpJ1ZxnVh373acxlqXQ8VwM88QhEHNuQ0ppNg='; frame-src 'self'; connect-src 'self'; form-action 'self'; base-uri 'self';frame-ancestors 'self';";
|
|
|
|
charset utf-8;
|
|
|
|
access_log /var/log/nginx/openhabcloud.org-access.log;
|
|
error_log /var/log/nginx/openhabcloud-error.log;
|
|
client_max_body_size 300m;
|
|
|
|
location /css {
|
|
alias /opt/openhab-cloud/public/css;
|
|
}
|
|
|
|
location /js {
|
|
alias /opt/openhab-cloud/public/js;
|
|
}
|
|
|
|
location /img {
|
|
alias /opt/openhab-cloud/public/img;
|
|
}
|
|
|
|
location /bootstrap {
|
|
alias /opt/openhab-cloud/public/bootstrap;
|
|
}
|
|
|
|
location /font-icons {
|
|
alias /opt/openhab-cloud/public/font-icons;
|
|
}
|
|
|
|
location /fonts {
|
|
alias /opt/openhab-cloud/public/fonts;
|
|
}
|
|
|
|
location /js-plugin {
|
|
alias /opt/openhab-cloud/public/js-plugin;
|
|
}
|
|
|
|
location /staff/js-plugin {
|
|
alias /opt/openhab-cloud/public/js-plugin;
|
|
}
|
|
|
|
location /downloads {
|
|
alias /opt/openhab-cloud/public/downloads;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://localhost:3000;
|
|
proxy_redirect off;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header X-Real-IP $remote_addr ;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
}
|
|
|
|
#error_page 404 /404.html;
|
|
|
|
# redirect server error pages to the static page /50x.html
|
|
#
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root html;
|
|
}
|
|
}
|