Reputation: 2211
I want to run meteor js server on a different host name. just like virtual hosts in xampp..
by default it runs on http://localhost:3000/
I want it to run on http://meteor.trivia.com:3000
both are local domains
I have tried to set ROOT_URL like that: set ROOT_URL=http://meteor.trivia.com:3000 meteor
and then to run meteor, but it crashes...
I have tried to set the hosts file and create a virtual host with proxy like that:
<VirtualHost meteor.trivia.com:3000>
ServerName meteor.trivia.com
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
ProxyPass http://localhost:3000/
ProxyPassReverse http://localhost:3000/
</Location>
</VirtualHost>
it worked, but the application still thinks it is on localhost.
Meteor.absoluteUrl(); is "localhost"
I am using windows
Upvotes: 3
Views: 1600
Reputation: 2211
open with nodepad: c:\Windows\System32\drivers\etc\hosts
add host the host
127.0.0.1 your.hostname.com
in cmd:
set ROOT_URL=http://meteor.trivia.com:3000
then run meteor
Upvotes: 0
Reputation: 941
for unix, it's just:
ROOT_URL=http://meteor.trivia.com:3000 meteor
(no "set" at the beginning)
if using windows:
set ROOT_URL=http://meteor.trivia.com:3000
(no "meteor" at the end)
and then, in a separate command:
meteor
Upvotes: 2