Bugfixes at nginx config create.
This commit is contained in:
@@ -50,16 +50,6 @@ echo
|
|||||||
echo "return 301 $REDIRECT_HTTPS;"
|
echo "return 301 $REDIRECT_HTTPS;"
|
||||||
|
|
||||||
else
|
else
|
||||||
if [[ $ERROR_PAGE != "" && $HTTP_PORT != "" ]]; then
|
|
||||||
echo "error_page 404 /$ERROR_PAGE;
|
|
||||||
location = /$ERROR_PAGE {
|
|
||||||
root html;
|
|
||||||
allow all;
|
|
||||||
index 404.html;
|
|
||||||
rewrite ^ "'$scheme'" http://$ERROR_PAGE"'$request_uri'" permanent;
|
|
||||||
}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo "location / {"
|
echo "location / {"
|
||||||
|
|
||||||
if [[ $HTTP_PORT != "" ]]; then
|
if [[ $HTTP_PORT != "" ]]; then
|
||||||
@@ -75,8 +65,17 @@ location = /$ERROR_PAGE {
|
|||||||
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
|
||||||
|
echo "error_page 404 /$ERROR_PAGE;
|
||||||
|
location = /$ERROR_PAGE {
|
||||||
|
root html;
|
||||||
|
allow all;
|
||||||
|
index 404.html;
|
||||||
|
rewrite ^ "'$scheme'" http://$ERROR_PAGE"'$request_uri'" permanent;
|
||||||
|
}"
|
||||||
|
fi
|
||||||
|
echo "}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $HTTPS_PORT != "" ]]; then
|
if [[ $HTTPS_PORT != "" ]]; then
|
||||||
|
Reference in New Issue
Block a user