Format config files

This commit is contained in:
Anthony Wang 2021-05-24 22:24:31 -05:00
parent 54db18b734
commit e809b37e9f
Signed by untrusted user: a
GPG key ID: 6FD3502572299774
13 changed files with 474 additions and 453 deletions

View file

@ -14,7 +14,9 @@ server {
root /srv/http/exozy.me;
index index.html;
location /.well-known/matrix/server { return 200 '{"m.server": "chat.exozy.me"}'; }
location /.well-known/matrix/server {
return 200 '{"m.server": "chat.exozy.me"}';
}
location /.well-known/webfinger {
return 301 https://social.exozy.me$request_uri;

View file

@ -15,7 +15,8 @@ server {
server {
if ($host = git.exozy.me) {
return 301 https://$host$request_uri;
} # managed by Certbot
}
# managed by Certbot
listen 80;

View file

@ -97,17 +97,27 @@ server {
location ^~ /.well-known {
# The following 6 rules are borrowed from `.htaccess`
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
location = /.well-known/carddav {
return 301 /remote.php/dav/;
}
location = /.well-known/caldav {
return 301 /remote.php/dav/;
}
# Anything else is dynamically handled by Nextcloud
location ^~ /.well-known { return 301 /index.php$uri; }
location ^~ /.well-known {
return 301 /index.php$uri;
}
try_files $uri $uri/ =404;
}
# Rules borrowed from `.htaccess` to hide certain paths from clients
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) {
return 404;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
return 404;
}
# Ensure this block, which passes PHP files to the PHP process, is above the blocks
# which handle static assets (as seen below). If this block is not declared first,

View file

@ -18,8 +18,12 @@ server {
listen [::]:80;
server_name social.exozy.me;
root /var/lib/mastodon/public;
location /.well-known/acme-challenge/ { allow all; }
location / { return 301 https://$host$request_uri; }
location /.well-known/acme-challenge/ {
allow all;
}
location / {
return 301 https://$host$request_uri;
}
}
server {

View file

@ -12,7 +12,9 @@ server {
default_type "text/plain";
root /var/lib/certbot;
}
location / { return 301 https://$host$request_uri; }
location / {
return 301 https://$host$request_uri;
}
}
upstream tube_backend {
@ -79,7 +81,9 @@ server {
}
location = /api/v1/videos/upload {
limit_except POST HEAD { deny all; }
limit_except POST HEAD {
deny all;
}
# This is the maximum upload size, which roughly matches the maximum size of a video file.
# Note that temporary space is needed equal to the total size of all concurrent uploads.

View file

@ -14,7 +14,9 @@ server {
error_page 403 404 502 503 504 /zabbix/index.php;
location ~ \.php$ {
if (!-f $request_filename) { return 404; }
if (!-f $request_filename) {
return 404;
}
expires epoch;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
@ -39,5 +41,3 @@ server {
}
}
}