From 3692335da2ad6f17a18c487843af296801c4738b Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sun, 27 Aug 2023 04:15:31 +0200 Subject: [PATCH] Add static websites setup. --- .../etc/nginx/sites-available/status.plomlompom.com.nginx | 7 +++++++ bookworm/setup_scripts/setup_web.sh | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 bookworm/etc_files/static_websites/etc/nginx/sites-available/status.plomlompom.com.nginx diff --git a/bookworm/etc_files/static_websites/etc/nginx/sites-available/status.plomlompom.com.nginx b/bookworm/etc_files/static_websites/etc/nginx/sites-available/status.plomlompom.com.nginx new file mode 100644 index 0000000..d16300f --- /dev/null +++ b/bookworm/etc_files/static_websites/etc/nginx/sites-available/status.plomlompom.com.nginx @@ -0,0 +1,7 @@ +server { + listen 443 ssl; + server_name REPLACE_fqdn_ECALPER; + ssl_certificate /etc/letsencrypt/live/REPLACE_fqdn_ECALPER/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/REPLACE_fqdn_ECALPER/privkey.pem; + root /var/www/status.plomlompom.com/; +} diff --git a/bookworm/setup_scripts/setup_web.sh b/bookworm/setup_scripts/setup_web.sh index 8bb9987..7f2c5a2 100755 --- a/bookworm/setup_scripts/setup_web.sh +++ b/bookworm/setup_scripts/setup_web.sh @@ -15,8 +15,8 @@ ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default certbot --nginx --agree-tos --redirect --no-eff-email -m "${mail}" -d "${domain}" rm /etc/nginx/sites-enabled/default -# Prepare NGINX. -sed -i "s/REPLACE_fqdn_ECALPER/${domain}/g" /etc/nginx/sites-available/dumpsite.nginx -ln -s /etc/nginx/sites-available/dumpsite.nginx /etc/nginx/sites-enabled/dumpsite.nginx +# Prepare NGINX for status.plomlompom.com. +sed -i "s/REPLACE_fqdn_ECALPER/${domain}/g" /etc/nginx/sites-available/status.plomlompom.com.nginx +ln -s /etc/nginx/sites-available/dumpsite.nginx /etc/nginx/sites-enabled/status.plomlompom.com.nginx service nginx restart -- 2.30.2