Hey All,
I followed the following guide:
http://julian.io/how-do-i-host-multiple-meteor-apps-on-one-digitalocean-droplet/
But I when I did it, I setup two www.domain.com type websites, lets call them:
For some reason, every time I try to navigate to www.domain2.com, it takes it redirects to www.domain1.com
I don’t know what I’d done wrong…
Here’s the conf files for both sites:
server {
listen *:80;
server_name domain1.com;
return 301 $scheme://www.domain1.com$request_uri;
}
server {
listen *:80;
server_name www.domain1.com;
access_log /var/log/nginx/app.dev.access.log;
error_log /var/log/nginx/app.dev.error.log;
location / {
proxy_pass http://localhost:3010;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header X-Forwarded-For $remote_addr;
}
}
server {
listen *:80;
server_name www.domain2.com;
access_log /var/log/nginx/app.dev.access.log;
error_log /var/log/nginx/app.dev.error.log;
location / {
proxy_pass http://localhost:4120;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header X-Forwarded-For $remote_addr;
}
}