Report this

What is the reason for this report?

Setting up a reverse proxy on DigitalOcean App Platform to route main domain and subdomains

Posted on August 29, 2025

I am trying to setup er reverse proxy for my app platform. I have created App A, that works as a NGINX reverse proxy, that either shows content from App A if it’s from rezite.com or app B if it’s a subdomain. However. I can’t get it to work? How can I build such a structure with App platform

# App A: handles rezite.com and rezite.dk server { listen 80; server_name rezite.com rezite.dk; location / { proxy_pass http://test-analytics-app-g5dqp.ondigitalocean.app; # Replace with App A's container name + port 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; } } # App B: handles all subdomains of rezite.com and rezite.dk server { listen 80; server_name *.rezite.com *.rezite.dk; location / { proxy_pass http://rezite-spaces.ams3.cdn.digitaloceanspaces.com; # Replace with App B's container name + port 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; } }

Am I doing anything wrong?



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.

Hey Frederik,

On App Platform you don’t need to run your own Nginx proxy. App Platform already terminates TLS and handles ingress. The supported way is to map your domains and subdomains directly to the app that should serve them:

  • Map rezite.com and rezite.dk to App A
  • Map *.rezite.com and *.rezite.dk to App B

A few important notes:

  • Wildcards are supported, but you must add the root domain first before adding a wildcard.

  • Wildcards aren’t allowed in the subdomain routing block of an app spec, you’d have to list those explicitly if you use subdomain routing.

Check out the docs: https://docs.digitalocean.com/products/app-platform/how-to/manage-domains/

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.