blob: 9606fc54d6bca5dbc11171f9b86506184b7b6603 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
upstream ponzu {
server admin:8080;
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /public;
index index.html index.htm;
location ~ /api(.*)$ {
try_files $uri @ponzu;
}
location ~ /admin(.*)$ {
try_files $uri @ponzu;
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.html;
}
location @ponzu {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://ponzu;
}
}
|