fix for error pages by splitting error_page and location directives,

delete nextcloud
This commit is contained in:
Arthur Lu 2023-10-11 21:50:12 -07:00
parent bbb8f02371
commit a756cfd6f9
11 changed files with 23 additions and 43 deletions

View File

@ -2,6 +2,7 @@ server {
listen 443 ssl http2; listen 443 ssl http2;
server_name tronnet.net; server_name tronnet.net;
include /etc/nginx/snippets/ssl-acme.conf; include /etc/nginx/snippets/ssl-acme.conf;
include /etc/nginx/snippets/proxy-errors.conf;
include /etc/nginx/snippets/error-pages.conf; include /etc/nginx/snippets/error-pages.conf;
location / { location / {
proxy_pass http://sites.dmz:80; proxy_pass http://sites.dmz:80;

View File

@ -2,6 +2,7 @@ server {
listen 443 ssl http2; listen 443 ssl http2;
server_name ldap.tronnet.net; server_name ldap.tronnet.net;
include /etc/nginx/snippets/ssl-acme.conf; include /etc/nginx/snippets/ssl-acme.conf;
include /etc/nginx/snippets/proxy-errors.conf;
include /etc/nginx/snippets/error-pages.conf; include /etc/nginx/snippets/error-pages.conf;
location / { location / {
proxy_pass http://ldap.dmz:80; proxy_pass http://ldap.dmz:80;

View File

@ -1,9 +0,0 @@
server {
listen 443 ssl http2;
server_name nextcloud.tronnet.net;
include /etc/nginx/snippets/ssl-acme.conf;
#location / {
# proxy_pass http://nextcloud2.dmz:11000;
# proxy_redirect default;
#}
}

View File

@ -2,6 +2,7 @@ server {
listen 443 ssl http2; listen 443 ssl http2;
server_name opns.tronnet.net; server_name opns.tronnet.net;
include /etc/nginx/snippets/ssl-acme.conf; include /etc/nginx/snippets/ssl-acme.conf;
include /etc/nginx/snippets/proxy-errors.conf;
include /etc/nginx/snippets/error-pages.conf; include /etc/nginx/snippets/error-pages.conf;
location / { location / {
proxy_pass https://10.0.0.1:10443; proxy_pass https://10.0.0.1:10443;

View File

@ -2,8 +2,9 @@ server {
listen 443 ssl http2; listen 443 ssl http2;
server_name paas.tronnet.net; server_name paas.tronnet.net;
include /etc/nginx/snippets/ssl-acme.conf; include /etc/nginx/snippets/ssl-acme.conf;
include /etc/nginx/snippets/error-pages.conf;
location /dashboard/ { location /dashboard/ {
include /etc/nginx/snippets/error-pages.conf; include /etc/nginx/snippets/proxy-errors.conf;
proxy_pass http://proxmoxaas.dmz:8080/; proxy_pass http://proxmoxaas.dmz:8080/;
proxy_redirect default; proxy_redirect default;
} }
@ -12,7 +13,6 @@ server {
proxy_redirect default; proxy_redirect default;
} }
location = / { location = / {
return 301 "/dashboard/"; return 301 "/dashboard/";
} }
include /etc/nginx/snippets/error-location.conf;
} }

View File

@ -2,6 +2,7 @@ server {
listen 443 ssl http2; listen 443 ssl http2;
server_name root.tronnet.net; server_name root.tronnet.net;
include /etc/nginx/snippets/ssl-acme.conf; include /etc/nginx/snippets/ssl-acme.conf;
include /etc/nginx/snippets/proxy-errors.conf;
include /etc/nginx/snippets/error-pages.conf; include /etc/nginx/snippets/error-pages.conf;
location / { location / {
proxy_pass http://root.root:80; proxy_pass http://root.root:80;

View File

@ -2,6 +2,7 @@ server {
listen 443 ssl http2; listen 443 ssl http2;
server_name status.tronnet.net; server_name status.tronnet.net;
include /etc/nginx/snippets/ssl-acme.conf; include /etc/nginx/snippets/ssl-acme.conf;
include /etc/nginx/snippets/proxy-errors.conf;
include /etc/nginx/snippets/error-pages.conf; include /etc/nginx/snippets/error-pages.conf;
location / { location / {
proxy_pass http://sites.dmz:8080; proxy_pass http://sites.dmz:8080;

View File

@ -2,6 +2,7 @@ server {
listen 443 ssl http2; listen 443 ssl http2;
server_name wiki.tronnet.net; server_name wiki.tronnet.net;
include /etc/nginx/snippets/ssl-acme.conf; include /etc/nginx/snippets/ssl-acme.conf;
include /etc/nginx/snippets/proxy-errors.conf;
include /etc/nginx/snippets/error-pages.conf; include /etc/nginx/snippets/error-pages.conf;
location / { location / {
proxy_pass http://sites.dmz:8081; proxy_pass http://sites.dmz:8081;

View File

@ -1,15 +0,0 @@
#proxy_intercept_errors on;
#error_page 400 /ErrorPages/HTTP400.html;
#error_page 401 /ErrorPages/HTTP401.html;
#error_page 403 /ErrorPages/HTTP403.html;
#error_page 404 /ErrorPages/HTTP404.html;
#error_page 500 /ErrorPages/HTTP500.html;
#error_page 501 /ErrorPages/HTTP501.html;
#error_page 502 /ErrorPages/HTTP502.html;
#error_page 503 /ErrorPages/HTTP503.html;
location /ErrorPages/ {
alias /var/www/html/ErrorPages/;
internal;
}

View File

@ -1,15 +1,4 @@
proxy_intercept_errors on; location /ErrorPages/ {
alias /var/www/html/ErrorPages/;
error_page 400 /ErrorPages/HTTP400.html; internal;
error_page 401 /ErrorPages/HTTP401.html; }
error_page 403 /ErrorPages/HTTP403.html;
error_page 404 /ErrorPages/HTTP404.html;
error_page 500 /ErrorPages/HTTP500.html;
error_page 501 /ErrorPages/HTTP501.html;
error_page 502 /ErrorPages/HTTP502.html;
error_page 503 /ErrorPages/HTTP503.html;
#location /ErrorPages/ {
# alias /var/www/html/ErrorPages/;
# internal;
#}

View File

@ -0,0 +1,9 @@
proxy_intercept_errors on;
error_page 400 /ErrorPages/HTTP400.html;
error_page 401 /ErrorPages/HTTP401.html;
error_page 403 /ErrorPages/HTTP403.html;
error_page 404 /ErrorPages/HTTP404.html;
error_page 500 /ErrorPages/HTTP500.html;
error_page 501 /ErrorPages/HTTP501.html;
error_page 502 /ErrorPages/HTTP502.html;
error_page 503 /ErrorPages/HTTP503.html;