Unify configs, enhance SSL security

This commit is contained in:
root
2018-03-25 20:23:08 +02:00
parent 83354160ea
commit 69047a611c
18 changed files with 446 additions and 373 deletions

View File

@@ -1,27 +1,42 @@
# -*-nginx-*-
server {
listen 80;
listen 443 ssl;
server_name fet.at 128.131.95.208;
ssl_certificate /etc/letsencrypt/live/www.fet.at/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.fet.at/privkey.pem;
root /srv/pxy/fet.at;
server_name fet.at 128.131.95.208;
location /.well-known {
allow all;
root /srv/pxy/fet.at;
allow all;
}
location / {
return 302 https://www.fet.at$request_uri;
}
}
server {
listen 80;
server_name www.fet.at;
root /srv/pxy/fet.at;
location /.well-known {
allow all;
}
server {
listen 443 ssl http2;
server_name fet.at;
ssl_certificate /etc/letsencrypt/live/fet.at/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/fet.at/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/fet.at/chain.pem;
include snippets/ssl.conf;
location / {
return 302 https://www.fet.at$request_uri;
}
}
server {
listen 80;
server_name www.fet.at;
client_max_body_size 50M;
location /.well-known {
root /srv/pxy/fet.at;
allow all;
}
location /etherpad {
proxy_pass http://192.168.95.11:3333;
proxy_set_header Host $host;
@@ -33,35 +48,24 @@ server {
}
server {
listen 443 ssl;
listen 443 ssl http2;
server_name www.fet.at;
ssl_certificate /etc/letsencrypt/live/www.fet.at/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.fet.at/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/www.fet.at/chain.pem;
# ssl_certificate /etc/letsencrypt/live/fet.at/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/fet.at/privkey.pem;
include snippets/ssl.conf;
# include snippets/ldap.conf;
client_max_body_size 50M;
# auth_ldap "FET Login";
# auth_ldap_servers fet;
root /srv/pxy/fet.at;
# root /srv/welcome;
location / {
proxy_pass http://192.168.95.11:3333;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
# index index.html;
}
location /.well-known {
allow all;
}
location /alt {
location ~ ^/(alt|twiki) {
return 302 https://www.alt.fet.at$request_uri;
}
location /twiki {
return 302 https://www.alt.fet.at$request_uri;
}
}