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,6 +48,7 @@ return 301 https://$DOMAIN_NAME;
|
||||
|
||||
fi
|
||||
|
||||
if [[ "$HTTP_PORT" != "" || "$HTTP_PORT" != "80" ]]; then
|
||||
echo "server {
|
||||
listen $HTTP_PORT proxy_protocol;
|
||||
set_real_ip_from 0.0.0.0/0;
|
||||
@@ -119,6 +120,7 @@ echo "rewrite_log on;"
|
||||
fi
|
||||
fi
|
||||
echo "}"
|
||||
fi
|
||||
|
||||
if [[ "$HTTPS_PORT" != "" ]]; then
|
||||
echo "server {
|
||||
|
Reference in New Issue
Block a user