Question

Using Proxy Server together with App Platform

Hello,

I have a domain managed by DO that is pointed to app platform.I want to have both an app and a blog separately, sampledomain.com will be pointed app platform and sampledomain.com/blog droplet. Keep in mind that beside the main domain multiple domain will be pointed to the same app for example sampledomain.net, sampledomain.io. Is there any way to use a proxy server in-between app platform and the blog in order to have a blog on a subdirectory ?


Submit an answer


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!

Sign In or Sign Up to Answer

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.

alexdo
Site Moderator
Site Moderator badge
March 26, 2023

Hello @simbyone2

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

Hope that this helps!

Bobby Iliev
Site Moderator
Site Moderator badge
March 26, 2023

Hi there,

One option here would be to just setup a redirect for sampledomain.com/blog to go to a blog.sampledomain.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. This will simplify your setup and make it more maintainable in the long run.

Besides that, there isn’t an option to do that out of the box, what you would need to do is to setup an Nginx service or an HAProxy service on a Droplet and configure all of your proxy rules there. Here is a discussion that covers some of the blockers that you might hit along the way:

https://www.digitalocean.com/community/questions/nginx-proxy-server-to-app-platform-app-is-getting-a-403-access-denied-cloudflare-error

Hope that this helps!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up