Setting up different subdomains for different apps


I’d like to set up subdomains for my apps, but can’t seem to wrap my head around how to do it.

In other words, I’d like
to become

I’m running Nginx, and I think this is doable with proxy_pass and rewrite, but yeah… I have no idea on how regexp works and I’m very unsure on how rewrite works at all.

Does anyone have any idea on how to do this? I’d be forever grateful.

EDIT: formatting.

1 Like

Take a loot at reverse proxy.

Here is a good tutorial:—-installing-and-configuring-nginx


Sorry, I should have been more clear. I already know the basics of reverse proxying and SSL certs. For some reason a simple proxy_pass doesn’t work, so there’s some need for rewrite, I think.

@loidor what do you mean with rewrite? Rewriting the url or what do you mean :slight_smile:

Aye :slight_smile:

Problem is, I have no idea about how regexp works, so I though I should ask here if someone had done it before.

Until I find a better way, I’ve just setup a return to the ordinary page.

return 301;