Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-01 13:17:32 -06:00
parent 34da4bc2a4
commit 468b3f7734

View File

@@ -98,21 +98,21 @@ case "$1" in
;; ;;
newsite) newsite)
mkdir /var/www/${1}/{public_folder,nginx_logs} mkdir -p /var/www/${2}/{public_folder,nginx_logs}
echo -e "server { echo -e "server {
listen 8443 ssl http2; listen 8443 ssl http2;
listen 8080; listen 8080;
server_name ${1}; server_name ${2};
set $base /var/www/${1}; set $base /var/www/${2};
root $base/public_html; root $base/public_html;
access_log /var/www/${1}/nginx_logs/access.log; access_log /var/www/${2}/nginx_logs/access.log;
error_log /var/www/${1}/nginx_logs/error.log warn; error_log /var/www/${2}/nginx_logs/error.log warn;
ssl_certificate /etc/letsencrypt/live/${1}/fullchain.pem; ssl_certificate /etc/letsencrypt/live/${2}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${1}/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/${2}/privkey.pem;
include conf.d/include/ssl-ciphers.conf; include conf.d/include/ssl-ciphers.conf;
index index.php; index index.php;
@@ -130,8 +130,8 @@ case "$1" in
include conf.d/include/general.conf; include conf.d/include/general.conf;
include conf.d/include/letsencrypt-acme-challenge.conf; include conf.d/include/letsencrypt-acme-challenge.conf;
} }
" > /etc/nginx/sites-available/${1}.conf " > /etc/nginx/sites-available/${2}.conf
nodemgmt set-permissions {$1} nodemgmt set-permissions {$2}
;; ;;
update) update)