1st commit - refined 2019 cfg + AI made README (I despise writing docs so it was either letting AI write README or having none, sorry)

This commit is contained in:
corrado.mulas
2026-05-19 00:00:03 +02:00
parent 910f9675b1
commit d1ab7d369c
22 changed files with 1439 additions and 0 deletions

57
nginx/custom.d/errorpage Normal file
View File

@@ -0,0 +1,57 @@
# This is an NGINX configuration file written and used by me in order to map HTTP errors to static HTML pages.
#
# (c) Corrado Mulas <tlc@mulas.me>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
# error_page 503 /main.html;
# location = /maint.html {
# root /var/www/;
# }
########### 4xx ##########################
error_page 401 @error41;
location @error41 {
root /var/www/errors;
rewrite ^(.*)$ /401.html break;
}
error_page 403 @error43;
location @error43 {
root /var/www/errors;
rewrite ^(.*)$ /403.html break;
}
error_page 404 @error44;
location @error44 {
root /var/www/errors;
rewrite ^(.*)$ /404.html break;
}
########### 5xx ###########################à
error_page 500 @error50;
location @error50 {
root /var/www/errors;
rewrite ^(.*)$ /500.html break;
}
error_page 502 @error52;
location @error52 {
root /var/www/errors;
rewrite ^(.*)$ /502.html break;
}
error_page 503 @error53;
location @error53 {
root /var/www/errors;
rewrite ^(.*)$ /503.html break;
}
error_page 504 @error54;
location @error54 {
root /var/www/errors;
rewrite ^(.*)$ /504.html break;
}