I am running a meteor app on Ubuntu 16.04 that serves up a website. Would like to serve another website (different domain) on same droplet. Is this possible?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
It works now. Missing piece was the server block config for ‘root’ for each site as explained here How To Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu 16.04. I also removed all ‘default_server’ settings for each site. Presume that second site redirected to first one due to it being set as ‘default_server’.
Thanks to @jtittle for all the help!
jtittle here are my nginx config files.
The nginx config for mymeteorapp1 - this one is currently live
This is the nginx config for mymeteorapp2 - this is the meteor app I am currently trying to deploy
This comment has been deleted
@striker78
Using NGINX, yes. You’d simply setup another server block for the second domain and change the port that you’re proxying to.
For example, if we have
domain01.com
anddomain02.com
, we might have something that looks like the following examples.domain01.com
domain01.com
The only thing we’re really changing in the server block is the port in
@backend
and the name of the server, i.eserver_name
.The reference to
proxy.conf
is where I store my proxy configuration, which looks like this:I prefer to keep the core configuration in another file and
include
it as it keeps the server blocks clean.