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,12 +23,13 @@ server {
server {
if ($host = donate.zzls.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name donate.zzls.xyz;
listen 80;
return 404; # managed by Certbot
}
# managed by Certbot
server_name donate.zzls.xyz;
listen 80;
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
server_name i.zzls.xyz;
listen 80;
return 404; # managed by Certbot
}
# managed by Certbot
server_name i.zzls.xyz;
listen 80;
return 404; # managed by Certbot
}

View file

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

View file

@ -27,31 +27,11 @@ server {
proxy_intercept_errors on;
}
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
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
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;
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
@ -59,33 +39,18 @@ server {
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = notlogs.zzls.xyz) {
if ($host = logs.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;
listen [::]:80;
listen 80;
listen [::]:80;
server_name logs.zzls.xyz;
return 404; # managed by Certbot
server_name logs.zzls.xyz;
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,18 +17,18 @@ server {
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = lsf.spanix.team) {
return 301 https://$host$request_uri;
} # managed by Certbot
server {
if ($host = lsf.spanix.team) {
return 301 https://$host$request_uri;
}
# managed by Certbot
listen 80;
listen [::]:80;
listen 80;
listen [::]:80;
server_name lsf.spanix.team;
return 404; # managed by Certbot
server_name lsf.spanix.team;
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,14 +30,15 @@ server {
server {
if ($host = mail.zzls.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
# managed by Certbot
server_name mail.zzls.xyz;
server_name mail.zzls.xyz;
listen 80;
return 404; # managed by Certbot
listen 80;
return 404; # managed by Certbot
}
}

View file

@ -1,11 +1,11 @@
server {
access_log /var/log/nginx/nossl.access.log combined;
access_log /var/log/nginx/nossl.access.log combined;
root /var/www/nossl;
index index.html index.htm index.nginx-debian.html;
root /var/www/nossl;
index index.html index.htm index.nginx-debian.html;
server_name nossl.zzls.xyz;
server_name nossl.zzls.xyz;
}
}

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,12 +18,13 @@ server {
server {
if ($host = posts.zzls.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
# managed by Certbot
server_name posts.zzls.xyz;
listen 80;
return 404; # managed by Certbot
server_name posts.zzls.xyz;
listen 80;
return 404; # managed by Certbot
}
}

View file

@ -1,34 +1,34 @@
server {
root /var/www/website;
index index.html index.htm index.nginx-debian.html;
root /var/www/website;
index index.html;
server_name zzls.xyz www.zzls.xyz;
server_name zzls.xyz www.zzls.xyz;
include configs/general.conf;
include configs/security.conf;
location /.well-known/matrix/client {
return 200 '{"m.homeserver": {"base_url": "https://matrix.zzls.xyz"}}';
default_type application/json;
add_header Access-Control-Allow-Origin *;
}
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"}';
default_type application/json;
add_header Access-Control-Allow-Origin *;
}
return 200 '{"m.server": "matrix.zzls.xyz:8448"}';
default_type application/json;
add_header Access-Control-Allow-Origin *;
}
location / {
try_files $uri $uri/ =404;
}
location / {
try_files $uri $uri/ =404;
}
location /transparency {
autoindex on;
autoindex_exact_size off;
autoindex_format html;
autoindex_localtime on;
location /transparency {
autoindex on;
autoindex_exact_size off;
autoindex_format html;
autoindex_localtime on;
}
listen 443 ssl http2; # managed by Certbot
@ -37,25 +37,23 @@ 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;
server_name zzls.xyz www.zzls.xyz;
listen 80;
return 404; # managed by Certbot
}