mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-06-16 16:47:53 +02:00
feat: enable API_URL in Dockerfile
fix tranga.conf not redirecting /api/ requests
This commit is contained in:
29
nginx/templates/default.conf.template
Normal file
29
nginx/templates/default.conf.template
Normal file
@ -0,0 +1,29 @@
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user