Review all configs

This commit is contained in:
root 2023-04-16 17:03:32 -04:00
parent 1cc9e8a86f
commit ca644e7413
10 changed files with 103 additions and 126 deletions

View file

@ -3,7 +3,7 @@ server {
access_log /var/log/nginx/donate.access.log combined;
root /var/www/donate;
index index.html index.htm index.nginx-debian.html;
index index.html;
server_name donate.zzls.xyz;
include configs/general.conf;
@ -23,7 +23,8 @@ server {
server {
if ($host = donate.zzls.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
# managed by Certbot
server_name donate.zzls.xyz;
@ -31,4 +32,4 @@ server {
return 404; # managed by Certbot
}
}

View file

@ -43,3 +43,16 @@ server {
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = files.zzls.xyz) {
return 301 https://$host$request_uri;
}
# managed by Certbot
listen 80;
server_name files.zzls.xyz;
return 404; # managed by Certbot
}

View file

@ -1,6 +1,5 @@
server {
access_log /var/log/nginx/i.access.log combined;
index index.html index.htm index.nginx-debian.html;
server_name i.zzls.xyz;
include configs/general.conf;
@ -20,10 +19,11 @@ server {
server {
if ($host = i.zzls.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
# managed by Certbot
server_name i.zzls.xyz;
listen 80;
return 404; # managed by Certbot
}
}

View file

@ -20,7 +20,8 @@ server {
server {
if ($host = logs.spanix.team) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
# managed by Certbot
listen 80;
@ -29,4 +30,4 @@ server {
return 404; # managed by Certbot
}
}

View file

@ -27,13 +27,11 @@ server {
proxy_intercept_errors on;
}
location = /50x.html {
location = /50x.html {
root /var/www/logs;
index 50x.html;
}
}
listen [::]:443 ssl http2; # managed by Certbot
listen 443 ssl http2; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/logs.zzls.xyz/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/logs.zzls.xyz/privkey.pem; # managed by Certbot
@ -41,44 +39,11 @@ location = /50x.html {
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
access_log /var/log/nginx/notlogs.access.log combined;
server_name notlogs.zzls.xyz;
location / {
rewrite ^/(.*)$ https://logs.zzls.xyz/$1 redirect;
}
listen [::]:443 ssl http2; # managed by Certbot
listen 443 ssl http2; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/logs.zzls.xyz/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/logs.zzls.xyz/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = notlogs.zzls.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name notlogs.zzls.xyz;
return 404; # managed by Certbot
}
server {
if ($host = logs.zzls.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
# managed by Certbot
listen 80;
@ -88,4 +53,4 @@ server {
return 404; # managed by Certbot
}
}

View file

@ -10,8 +10,6 @@ server {
include configs/proxy.conf;
}
listen [::]:443 ssl http2; # managed by Certbot
listen 443 ssl http2; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/lsf.spanix.team/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/lsf.spanix.team/privkey.pem; # managed by Certbot
@ -19,11 +17,11 @@ server {
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
server {
if ($host = lsf.spanix.team) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
# managed by Certbot
listen 80;
@ -33,4 +31,4 @@ server {
return 404; # managed by Certbot
}
}

View file

@ -2,7 +2,7 @@ server {
access_log /var/log/nginx/mail.access.log combined;
root /var/www/mail;
index index.html index.htm index.nginx-debian.html;
index index.html;
server_name mail.zzls.xyz;
include configs/general.conf;
@ -30,7 +30,8 @@ server {
server {
if ($host = mail.zzls.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
# managed by Certbot
server_name mail.zzls.xyz;
@ -40,4 +41,4 @@ server {
return 404; # managed by Certbot
}
}

View file

@ -2,13 +2,12 @@ server {
access_log /var/log/nginx/posts.access.log combined;
root /var/www/posts;
index index.html index.htm index.nginx-debian.html;
index index.html;
server_name posts.zzls.xyz;
include configs/general.conf;
include configs/security.conf;
listen 443 ssl http2; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/posts.zzls.xyz/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/posts.zzls.xyz/privkey.pem; # managed by Certbot
@ -19,7 +18,8 @@ server {
server {
if ($host = posts.zzls.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
# managed by Certbot
server_name posts.zzls.xyz;
@ -27,4 +27,4 @@ server {
return 404; # managed by Certbot
}
}

View file

@ -1,7 +1,7 @@
server {
root /var/www/website;
index index.html index.htm index.nginx-debian.html;
index index.html;
server_name zzls.xyz www.zzls.xyz;
include configs/general.conf;
@ -12,13 +12,13 @@ server {
return 200 '{"m.homeserver": {"base_url": "https://matrix.zzls.xyz"}}';
default_type application/json;
add_header Access-Control-Allow-Origin *;
}
}
location /.well-known/matrix/server {
return 200 '{"m.server": "matrix.zzls.xyz:443"}';
return 200 '{"m.server": "matrix.zzls.xyz:8448"}';
default_type application/json;
add_header Access-Control-Allow-Origin *;
}
}
location / {
try_files $uri $uri/ =404;
@ -37,18 +37,18 @@ server {
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.zzls.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
# managed by Certbot
if ($host = zzls.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
# managed by Certbot
server_name zzls.xyz www.zzls.xyz;
@ -56,6 +56,4 @@ server {
return 404; # managed by Certbot
}