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

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I’m having an issue trying to proxy pass to my App Platform application from another server.
I have a .NET 6 app running in a Docker container on App Platform. This is running fine. I hit my API from my REST client using the domain given to my app by App Platform.
What I’m trying to do now is add an entry to my server running Nginx to proxy requests from my domain to the application on App Platform.
server {
listen 443 ssl;
server_name ~^(?<subdomain>[\w-]+)\.mydomain\.com$ mydomain.com;
ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem;
location /api {
proxy_pass https://my-app-platform-app.ondigitalocean.app;
proxy_http_version 1.1;
}
}
This works fine, my api receives the request but the Host header of the request is the app platform domain (https://my-app-platform-app.ondigitalocean.app) but want my domain from my proxy server (https://mydomain.com) as the Host header. So what I did was set the Host header with proxy_set_header in my Nginx config like below.
server {
listen 443 ssl;
server_name ~^(?<subdomain>[\w-]+)\.mydomain\.com$ mydomain.com;
ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem;
location /api {
proxy_set_header Host $host;
proxy_pass https://my-app-platform-app.ondigitalocean.app;
proxy_http_version 1.1;
}
}
Now when I try to access my API from mydomain.com/api I get a 403 Permission Denied - Cloudfare error
Has anyone encountered this issue, or know what I’m doing wrong with this?
Thank you.
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
Ruz
Ruz
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e
markatango
gouskova
Andrew J Montanus