worker_processes auto; error_log stderr notice; pid /app/nginx.pid; events { worker_connections 10; } http { server { listen 7860; location = / { default_type text/plain; return 200 'hello'; } # Main App Route (HTTP on port 7860) location = /app { proxy_pass http://127.0.0.1:8000; # Main app service (replace with your actual backend) proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } # DNS-over-HTTP Route (PathPrefix /dns-http on port 7860) location /dns-http/ { proxy_pass http://127.0.0.1:5380; # Replace "dns-server" with actual service name proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } # DNS-over-HTTPS Route (PathPrefix /dns-https on port 7860) location /dns-https/ { proxy_pass http://127.0.0.1:5381; # Replace "dns-server" with actual service name proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } # DNS-over-TLS Route (PathPrefix /dns-tls on port 7860) location /dns-tls/ { proxy_pass http://127.0.0.1:853; # Replace "dns-server" with actual service name proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } # Traefik Dashboard Route (PathPrefix /dashboard) location /dashboard/ { proxy_pass http://127.0.0.1:8080; # Assuming Traefik Dashboard is served locally on port 8080 proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } } }