add static site support
This commit is contained in:
@@ -33,6 +33,7 @@ server {
|
||||
ssl_stapling_verify on;
|
||||
server_name {{ inventory_hostname }};
|
||||
|
||||
{% if not static_site %}
|
||||
location / {
|
||||
client_max_body_size 512M;
|
||||
proxy_pass http://localhost:3000;
|
||||
@@ -43,4 +44,13 @@ server {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
{% endif %}
|
||||
{% if static_site %}
|
||||
root /srv/http/{{ inventory_hostname }}/html;
|
||||
index index.html;
|
||||
error_page 404 /404.html;
|
||||
location / {
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user