zappyzep/docker/production/nginx/default.conf
laraproto dd8d3a2c88
All checks were successful
Code quality checks / build (23) (push) Successful in 36s
Push code / build (push) Successful in 48s
just don't bother with catch all server_name
2024-11-02 16:04:43 +02:00

35 lines
891 B
Text

server {
listen 80 default_server;
server_name zappyzep.xyz;
# Using a variable here stops nginx from crashing if the dev container is restarted or becomes otherwise unavailable
set $backend_upstream "http://api:3001";
set $dashboard_upstream "http://dashboard:3002";
location / {
# Using a variable in proxy_pass also requires resolver to be set.
# This is the address of the internal docker compose DNS server.
resolver 127.0.0.11;
proxy_pass $dashboard_upstream$uri$is_args$args;
}
location /api {
resolver 127.0.0.11;
proxy_pass $backend_upstream$uri$is_args$args;
proxy_redirect off;
client_max_body_size 200M;
}
}
server {
listen 80;
server_name new.zappyzep.xyz;
set $dashboard_upstream "http://revampdashboard:3000";
location / {
resolver 127.0.0.11;
proxy_pass $dashboard_upstream$uri$is_args$args;
}
}