Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse Proxy Nginx #875

Open
manuel-schoebel opened this issue Sep 30, 2014 · 5 comments
Open

Reverse Proxy Nginx #875

manuel-schoebel opened this issue Sep 30, 2014 · 5 comments

Comments

@manuel-schoebel
Copy link
Contributor

Hi all,

I have a meteor application on that you can build a website in a website editor. The result would then be a website on the url:
http://my-meteor-app.com/websites/12345567

Of course you now want to have your own url like http://my-url.com and show the application behind the app-url.

As a proxy I use nginx and the config looks kinda like this:

server {
    listen 80;
    server_name my-url.com;

    location / {
        proxy_pass http://my-meteor-app.com/websites/12345567;
        proxy_redirect off;
        ...
    }
}

This kinda works but the problem, I guess is, that the iron router would always render the route for "/" and not the route for "/websites/12345567" if you are on the site "http://my-url.com".

I thought about a dynamic action for the route for path "/" but it does not really seem like a nice solution ;)

Does anyone have an idea how to work around this?

@tedgoldstein
Copy link

Have you found a solution to this issue? I have it too.

@manuel-schoebel
Copy link
Contributor Author

Since I only need the home route (path: "/") for this I do it in the action of the router, checking for the location.href and looking the necessary data up in the database.

It is not ideal but works for me.

@tmeasday
Copy link
Contributor

@DerMambo you might be able to figure something out with connect handlers in 1.0?

@tmeasday tmeasday added this to the Icebox milestone Oct 18, 2014
@manuel-schoebel
Copy link
Contributor Author

Haven't been able to look into this but this might be a good idea, thanks!

But another issue is the spiderable package for SEO since it depends on the static ROOT_URL. This also requires some workaround.

@bryankennedy
Copy link

I have this problem as well. There's some discussion about solutions and future designs over on these other issues: #848, #154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants