5af3005179
fix tranga.conf not redirecting /api/ requests
29 lines
603 B
Plaintext
29 lines
603 B
Plaintext
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
|
|
http2 on;
|
|
|
|
server_name _;
|
|
|
|
access_log /dev/stdout main;
|
|
error_log /dev/stderr;
|
|
|
|
location /api/ {
|
|
proxy_pass_request_headers on;
|
|
rewrite ^/api/(.*)$ /$1 break;
|
|
proxy_pass $API_URL;
|
|
}
|
|
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
index index.html index.htm;
|
|
}
|
|
|
|
# redirect server error pages to the static page /50x.html
|
|
#
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
} |