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,11 +1,11 @@
# -*-nginx-*-
server {
listen 80;
server_name wp2.triton.fet.at www.wp2.triton.fet.at;
server_name wp2.triton.fet.at www.wp2.triton.fet.at;
location /.well-known {
root /srv/welcome;
allow all;
root /srv/welcome;
allow all;
}
location / {
return 301 https://$host$request_uri;
@@ -16,27 +16,24 @@ upstream triamp2 {
server triton-amp.local:8003;
}
server {
listen 443 ssl;
listen 443 ssl http2;
server_name wp2.triton.fet.at www.wp2.triton.fet.at;
ssl_certificate /etc/letsencrypt/live/wp.triton.fet.at/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/wp.triton.fet.at/privkey.pem;
satisfy any;
auth_ldap "Under construction";
auth_ldap_servers fet;
ssl_trusted_certificate /etc/letsencrypt/live/wp.triton.fet.at/chain.pem;
auth_basic "Under construction";
auth_basic_user_file /srv/.passwd;
location /.well-known {
root /srv/welcome;
allow all;
}
include snippets/ssl.conf;
satisfy any;
location / {
# rewrite ^/wp/(.*)$ /$1 break;
include snippets/ldap.conf;
auth_basic "Under construction";
auth_basic_user_file /srv/.passwd;
# rewrite ^/wp/(.*)$ /$1 break;
# return 301 http://$host$request_uri;
proxy_pass http://triamp2;
proxy_set_header Accept-Encoding "";
@@ -47,7 +44,7 @@ server {
proxy_set_header HTTP_X_FORWARDED_SSL on;
proxy_redirect default;
# more_set_headers 'Link: <https://wp.triton.fet.at/index.php/wp-json/>; rel="https://api.w.org/", <https://wp.triton.fet.at/>; rel=shortlink'
# more_set_headers 'Link: <https://wp.triton.fet.at/index.php/wp-json/>; rel="https://api.w.org/", <https://wp.triton.fet.at/>; rel=shortlink'
# more_set_headers 'Hello: World'
# sub_filter http https;
# sub_filter WordPress WP;
@@ -56,12 +53,8 @@ server {
sub_filter http://wp2.triton.fet.at https://wp2.triton.fet.at;
# sub_filter http: https:;
# sub_filter_types text/html;
# sub_filter_types text/html;
# sub_filter_types application/javascript, text/javascript, text/html;# application/html text/* application/x-javascript text/xml;
sub_filter_once off;
}
}