fix: Install zip and fix nginx
This commit is contained in:
parent
74e272727f
commit
a23206f390
@ -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
|
||||||
|
12
sites.py
12
sites.py
@ -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 {{
|
||||||
|
Loading…
Reference in New Issue
Block a user