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

How to change "localhost:3000"? #7

Closed
abliss opened this issue Mar 26, 2014 · 2 comments
Closed

How to change "localhost:3000"? #7

abliss opened this issue Mar 26, 2014 · 2 comments

Comments

@abliss
Copy link
Contributor

abliss commented Mar 26, 2014

I'm trying to run my sandstorm host on an actual server on the internet; so I want to change "localhost" to my domain name, and 3000 to 80.

I've already discovered that I "meteor --port 80" won't work unless I first do these:
sudo setcap 'cap_net_bind_service=+ep' ~/.meteor/tools/latest/mongodb/bin/mongod
sudo setcap 'cap_net_bind_service=+ep' ~/.meteor/tools/latest/bin/node

However:

  1. When I load the new page in the browser on port 80, it doesn't seem to work. Chrome's dev console doesn't report any failed network requests; but something must be wrong with the websocket that gets created.
  2. Also, "localhost:3000" seems to be hardcoded somewhere as the redirect url for Google oauth.
@abliss
Copy link
Contributor Author

abliss commented Mar 26, 2014

I've managed to get this commandline to work:
PORT=3000 ROOT_URL=http://example.com:3000 meteor --port 3000

That corrects the OAuth redirect uri. But changing those 3000 all to 80 doesn't work, even with the setcaps I mentioned.

@kentonv
Copy link
Member

kentonv commented Mar 26, 2014

The recommended solution here is to stick an nginx reverse proxy in front of the node server. nginx is all set up to open port 80 before dropping privs -- node doesn't seem very good at this. Also, with nginx you can support SSL. I need to write some docs on this with example configs.

BTW, note that running the server through the "meteor" command is intended for local development. When deploying something more production-y, you should use "meteor bundle" to create a tarball, unpack that tarball somewhere, and read the readme inside.

That said, that doesn't necessarily solve your problems. And, actually, running in dev mode probably makes sense if you expect to tweak the code at all.

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

No branches or pull requests

2 participants