diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index b7bb4f9a..69e0acd5 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -105,16 +105,18 @@ case "$1" in echo "" if [ "${SITE_TYPE}" = "local" ]; then echo -e "server { - listen 8443 ssl http2; - listen 8080; - - + listen 8080;" > /etc/nginx/sites-available/${NEW_SITE}.conf + if [ "${CREATE_SSL}" = "true" ]; then + echo -e " listen 8443 ssl http2;" > /etc/nginx/sites-available/${NEW_SITE}.conf + fi + echo -e " server_name ${NEW_SITE}; + set \$base /var/www/${NEW_SITE}; root \$base/public_html; access_log /var/www/${NEW_SITE}/nginx_logs/access.log; - error_log /var/www/${NEW_SITE}/nginx_logs/error.log warn;" > /etc/nginx/sites-available/${NEW_SITE}.conf + error_log /var/www/${NEW_SITE}/nginx_logs/error.log warn;" >> /etc/nginx/sites-available/${NEW_SITE}.conf if [ "${CREATE_SSL}" = "true" ]; then echo -e "