Minor bugfixes at nginx config create script.

This commit is contained in:
2021-09-16 19:04:04 +00:00
parent 5f5e2e3603
commit 67945cf556

View File

@@ -41,7 +41,6 @@ listen $HTTP_PORT;
server_name $DOMAIN_NAME; server_name $DOMAIN_NAME;
rewrite_log on;" rewrite_log on;"
echo
if [[ $REDIRECT_HTTP != "" && $HTTP_PORT != "" ]]; then if [[ $REDIRECT_HTTP != "" && $HTTP_PORT != "" ]]; then
echo "return 301 $REDIRECT_HTTP;" echo "return 301 $REDIRECT_HTTP;"
@@ -64,17 +63,19 @@ echo
proxy_set_header Upgrade "'$http_upgrade'"; proxy_set_header Upgrade "'$http_upgrade'";
proxy_set_header Connection "'$http_connection'"; proxy_set_header Connection "'$http_connection'";
proxy_cookie_path / /; proxy_cookie_path / /;
access_log off; access_log off;"
}"
if [[ $ERROR_PAGE != "" && $HTTP_PORT != "" ]]; then if [[ $ERROR_PAGE != "" && $HTTP_PORT != "" ]]; then
echo "error_page 404 /$ERROR_PAGE; echo "error_page 404 /$ERROR_PAGE;
location = /$ERROR_PAGE { location = /$ERROR_PAGE {
root html; root html;
allow all; allow all;
index 404.html; index 404.html;
rewrite ^ "'$scheme'" http://$ERROR_PAGE"'$request_uri'" permanent; rewrite ^ "'$scheme'" http://$ERROR_PAGE"'$request_uri'" permanent;
}" }"
fi fi
echo "}"
fi
echo "}" echo "}"
fi fi