fix: Install zip and fix nginx

This commit is contained in:
Nathan Woodburn 2024-02-23 15:51:56 +11:00
parent 74e272727f
commit a23206f390
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@ fi
# Install nginx # Install nginx
sudo apt update sudo apt update
sudo apt install nginx python3-pip -y sudo apt install nginx python3-pip zip unzip -y
cd /root cd /root
git clone https://git.woodburn.au/nathanwoodburn/site-manager.git git clone https://git.woodburn.au/nathanwoodburn/site-manager.git

View File

@ -189,15 +189,15 @@ def write_nginx_conf(site):
server_name {domain} *.{domain}; server_name {domain} *.{domain};
location / {{ location / {{
try_files \$uri \$uri/ $uri/index.html @htmlext; try_files $uri $uri/ @htmlext;
}} }}
location ~ \.html$ {{ location ~ \.html$ {{
try_files \$uri =404; try_files $uri =404;
}} }}
location @htmlext {{ location @htmlext {{
rewrite ^(.*)$ \$1.html last; rewrite ^(.*)$ $1.html last;
}} }}
error_page 404 /404.html; error_page 404 /404.html;
location = /404.html {{ location = /404.html {{
@ -232,15 +232,15 @@ def write_nginx_conf(site):
server_name {alt} *.{alt}; server_name {alt} *.{alt};
location / {{ location / {{
try_files \$uri \$uri/ $uri/index.html @htmlext; try_files $uri $uri/ @htmlext;
}} }}
location ~ \.html$ {{ location ~ \.html$ {{
try_files \$uri =404; try_files $uri =404;
}} }}
location @htmlext {{ location @htmlext {{
rewrite ^(.*)$ \$1.html last; rewrite ^(.*)$ $1.html last;
}} }}
error_page 404 /404.html; error_page 404 /404.html;
location = /404.html {{ location = /404.html {{