diff --git a/docker/nginx/conf.d/include/location-skylink b/docker/nginx/conf.d/include/location-skylink index 419eba2b..ec9f91ad 100644 --- a/docker/nginx/conf.d/include/location-skylink +++ b/docker/nginx/conf.d/include/location-skylink @@ -38,14 +38,6 @@ proxy_set_header User-Agent: Sia-Agent; proxy_pass http://sia:9980/skynet/skylink/$skylink$path$is_args$args; proxy_intercept_errors on; -root /etc/nginx/conf.d/pages; -# error_page 400 /400.html; -error_page 401 /401.html; -# error_page 403 /403.html; -# error_page 404 /404.html; -# error_page 451 /451.html; -# error_page 500 501 502 503 /5xx.html; - log_by_lua_block { local skynet_account = require("skynet.account") local skynet_modules = require("skynet.modules") diff --git a/docker/nginx/conf.d/server/server.api b/docker/nginx/conf.d/server/server.api index 82f05c32..beeb1dff 100644 --- a/docker/nginx/conf.d/server/server.api +++ b/docker/nginx/conf.d/server/server.api @@ -23,6 +23,12 @@ rewrite ^/stats /skynet/stats permanent; rewrite ^/skynet/blacklist /skynet/blocklist permanent; rewrite ^/docs(?:/(.*))?$ https://sdk.skynetlabs.com/$1 permanent; +error_page 401 = @http_401; +location @http_401 { + root /etc/nginx/conf.d/pages; + alias 401.txt; +} + #location / { # include /etc/nginx/conf.d/include/cors; #