Help Recreate Nginx conf in Caddy

Hello,

I really need to see how to recreate this using caddy. I have a Docker Compose file with 5 containers BUT two of the containers expose web apps/api. I can ONLY expose 1 port publicly, this works in NGINX

worker_processes 1;
events {
worker_connections 1024;
}
http {
server {
listen 8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
location /result/ {
proxy_pass http://result:80/;
proxy_redirect off;
}
location / {
if ($http_referer ~* (/result) ) {
proxy_pass http://result:80;
break;
}
proxy_pass http://vote:80;
}
}
}

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.