From 5aaba0492606d15af6003a5f70dc407a4d35331e Mon Sep 17 00:00:00 2001 From: ymir1v <77013986+ymir1v@users.noreply.github.com> Date: Fri, 25 Jun 2021 15:42:15 +0200 Subject: [PATCH] Update 11_install_nginx.sh --- setup/11_install_nginx.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup/11_install_nginx.sh b/setup/11_install_nginx.sh index 738aad1e..92b1f22d 100755 --- a/setup/11_install_nginx.sh +++ b/setup/11_install_nginx.sh @@ -14,6 +14,14 @@ openssl req -subj "/CN=$HOSTNAME/O=My Company Name LTD./C=US" -new -newkey rsa:2 chown -R wildduck:wildduck /etc/wildduck/certs chmod 0700 /etc/wildduck/certs/privkey.pem +# create nginx config dirs - if missing +if [[ ! -d /etc/nginx/sites-available ]]; then + mkdir -p /etc/nginx/sites-available +fi +if [[ ! -d /etc/nginx/sites-enabled ]]; then + mkdir -p /etc/nginx/sites-enabled +fi + # Setup domain without SSL at first, otherwise acme.sh will fail echo "server { listen 80;