Subdomain redirect to path


I’m trying to update nginx to permanently redirect from a to Based nginx best practices, it looks like I should add a new server block with a return statement. Based on how Discourse works with Digital Ocean, it looks like I want to make the change in containers/app.yml. I’ve made other smaller changes by using replace, but in this case I want to add an entire server block. What’s the best way to accomplish this?

Thank you.

We strongly recommend against a subfolder install, it add significant complexity for limited (if any) benefit. If you absolutely must have a subfolder, see Subfolder support with Docker.

1 Like

Thanks @jomaxro. We have everything working fine with the subfolder install. It wasn’t too bad thanks to help from this forum and that thread. We just want to redirect 301 from the subdomain to the subfolder url. Maybe I’m missing something but where in that linked thread does it address the redirect?

Just do it. It’s the same as the smaller changes you’ve made.