I have a site with Nginx hosted on a Droplet, and I’m trying to create a reverse proxy for a subdirectory (/app) to another web application running on the App Platform in a Docker container. Unfortunately, I keep getting a 502 error no matter what I do. It’s possible to set up another site or domain, but not the one I want to run under the App Platform. Is there something I need to enable in the App Platform to allow a reverse proxy?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
This comment has been deleted
Heya,
You can create a reverse proxy from Nginx to the URL generated from the App platform.
A similar idea was shared before in the community before:
https://www.digitalocean.com/community/questions/reverse-proxy-from-droplet-to-app-platform
One other option here would be to just setup a redirect for
domain.com/app)
to go to aapp.domain.com
subdomain. That way you will not have to setup a proxy service to handle all requests, but you can just point the blog subdomain A record to the Droplet and then keep the main domain pointed to the App Platform.Regards
To resolve the 502 error, ensure your Docker container’s app is accessible from the Droplet. Check firewall settings, ensure Nginx is correctly configured with the upstream server details, and verify that the App Platform’s app allows external connections. Also, confirm that Nginx’s proxy settings match the app’s requirements.