Fixing http section when variable empty
This commit is contained in:
@@ -37,7 +37,7 @@ file="/tmp/$DOMAIN.conf"
|
||||
|
||||
{
|
||||
|
||||
if [[ "$HTTP_PORT" != "80" || "$HTTP_PORT" == "" ]]; then
|
||||
if [[ "$HTTP_PORT" != "80" ]]; then
|
||||
echo "server {
|
||||
listen 80 proxy_protocol;
|
||||
set_real_ip_from 0.0.0.0/0;
|
||||
@@ -48,10 +48,11 @@ return 301 https://$DOMAIN_NAME;
|
||||
|
||||
fi
|
||||
|
||||
echo "server {
|
||||
listen $HTTP_PORT proxy_protocol;
|
||||
set_real_ip_from 0.0.0.0/0;
|
||||
real_ip_header proxy_protocol;"
|
||||
if [[ "$HTTP_PORT" != "" || "$HTTP_PORT" != "80" ]]; then
|
||||
echo "server {
|
||||
listen $HTTP_PORT proxy_protocol;
|
||||
set_real_ip_from 0.0.0.0/0;
|
||||
real_ip_header proxy_protocol;"
|
||||
|
||||
if [[ "$ALIASES_HTTP" != "" ]]; then
|
||||
echo "server_name $DOMAIN_NAME $ALIASES_HTTP;"
|
||||
@@ -67,7 +68,7 @@ real_ip_header proxy_protocol;"
|
||||
echo "client_max_body_size 0;"
|
||||
fi
|
||||
|
||||
echo "rewrite_log on;"
|
||||
echo "rewrite_log on;"
|
||||
|
||||
|
||||
if [[ "$REDIRECT_HTTP" != "" ]] ; then
|
||||
@@ -118,7 +119,8 @@ echo "rewrite_log on;"
|
||||
}"
|
||||
fi
|
||||
fi
|
||||
echo "}"
|
||||
echo "}"
|
||||
fi
|
||||
|
||||
if [[ "$HTTPS_PORT" != "" ]]; then
|
||||
echo "server {
|
||||
|
Reference in New Issue
Block a user