28 lines
659 B
Plaintext
28 lines
659 B
Plaintext
|
server {
|
||
|
|
||
|
listen 80;
|
||
|
server_name {{ http_host }};
|
||
|
|
||
|
# Allow large attachments
|
||
|
client_max_body_size 128M;
|
||
|
|
||
|
location @proxy-backend {
|
||
|
proxy_pass http://proxy_backend;
|
||
|
proxy_set_header Host $http_host;
|
||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||
|
proxy_set_header X-Forwarded-Port $server_port;
|
||
|
proxy_set_header X-Forwarded-Host $host;
|
||
|
proxy_redirect off;
|
||
|
}
|
||
|
location / {
|
||
|
root /var/lib/{{ host_directory }}/frontend;
|
||
|
index index.html index.htm;
|
||
|
try_files $uri/index.html $uri @proxy-backend;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
upstream proxy_backend {
|
||
|
server localhost:3003;
|
||
|
}
|