zodern / meteor-up

Production Quality Meteor Deployment to Anywhere
http://meteor-up.com/
MIT License
1.27k stars 281 forks source link

Routing subdomains to app routes #1330

Open bruceborrett opened 1 year ago

bruceborrett commented 1 year ago

I please need some assistance with custom Nginx configuration for the following scenario:

I want to have different subdomains pointing to different routes in my app, for example:

example.com -> / app.example.com -> /app shop.example.com -> /shop

I have searched and only found examples of routing different domains to different apps, not to the same app.

The documentation is also not very clear on how to use the custom server and custom location configs.

Thanks in advance.

evolross commented 1 year ago

We do something similar to this. You can just just parse the URL in your router and then route to a different route or URL in your app. As long as the URL is configured correctly, this is an application issue.