26 lines
565 B
Plaintext
26 lines
565 B
Plaintext
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
|
|
server_name localhost;
|
|
root /srv/www/bookshelf;
|
|
index index.html;
|
|
|
|
location / {
|
|
try_files $uri /index.html;
|
|
}
|
|
|
|
location /api/ {
|
|
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_redirect off;
|
|
proxy_buffering off;
|
|
proxy_pass http://backend;
|
|
}
|
|
}
|
|
|
|
upstream backend {
|
|
server back:8000;
|
|
} |