forked from exozyme/nginx
Format config files
This commit is contained in:
parent
54db18b734
commit
e809b37e9f
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue