From a23206f390724f5f847436255cb593ce1cb0225c Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Fri, 23 Feb 2024 15:51:56 +1100 Subject: [PATCH] fix: Install zip and fix nginx --- install.sh | 2 +- sites.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 1142427..5e89524 100755 --- a/install.sh +++ b/install.sh @@ -8,7 +8,7 @@ fi # Install nginx sudo apt update -sudo apt install nginx python3-pip -y +sudo apt install nginx python3-pip zip unzip -y cd /root git clone https://git.woodburn.au/nathanwoodburn/site-manager.git diff --git a/sites.py b/sites.py index 932b16d..3670e93 100644 --- a/sites.py +++ b/sites.py @@ -189,15 +189,15 @@ def write_nginx_conf(site): server_name {domain} *.{domain}; location / {{ - try_files \$uri \$uri/ $uri/index.html @htmlext; + try_files $uri $uri/ @htmlext; }} location ~ \.html$ {{ - try_files \$uri =404; + try_files $uri =404; }} location @htmlext {{ - rewrite ^(.*)$ \$1.html last; + rewrite ^(.*)$ $1.html last; }} error_page 404 /404.html; location = /404.html {{ @@ -232,15 +232,15 @@ def write_nginx_conf(site): server_name {alt} *.{alt}; location / {{ - try_files \$uri \$uri/ $uri/index.html @htmlext; + try_files $uri $uri/ @htmlext; }} location ~ \.html$ {{ - try_files \$uri =404; + try_files $uri =404; }} location @htmlext {{ - rewrite ^(.*)$ \$1.html last; + rewrite ^(.*)$ $1.html last; }} error_page 404 /404.html; location = /404.html {{