Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I’m fairly new here, so bear with me.
I just created a Ubuntu 14.0.4 droplet and installed NginX and Node.js. Two domains are configured with the D.O. nameservers, and two DNS entries are added on D.O.
$ORIGIN domain1.com.
$TTL 1800
domain1.com. IN SOA ns1.digitalocean.com. hostmaster.domain1.com. xxxxxxxxxx xxxxx xxxx xxxxxx xxxx
domain1.com. 1800 IN NS ns1.digitalocean.com.
domain1.com. 1800 IN NS ns2.digitalocean.com.
domain1.com. 1800 IN NS ns3.digitalocean.com.
domain1.com. 1800 IN A 1.2.3.4
*.domain1.com. 1800 IN CNAME domain1.com.
$ORIGIN domain2.com.
$TTL 1800
domain2.com. IN SOA ns1.digitalocean.com. hostmaster.domain2.com. xxxxxxxxxx xxxxx xxxx xxxxxx xxxx
domain2.com. 1800 IN NS ns1.digitalocean.com.
domain2.com. 1800 IN NS ns2.digitalocean.com.
domain2.com. 1800 IN NS ns3.digitalocean.com.
domain2.com. 1800 IN A 1.2.3.4
*.domain2.com. 1800 IN CNAME domain2.com.
Both domains have the * => @ CNAME wildcard.
On NginX there are two files (one for every domain) on sites-enabled (and of course sites-available): domain1.com
upstream app_domain1 {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name domain1.com;
access_log /var/log/nginx/domain1.log;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://app_domain1;
proxy_redirect off;
}
}
upstream app_domain2 {
server 127.0.0.1:4000;
}
server {
listen 80;
server_name domain2.com;
access_log /var/log/nginx/domain2.log;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://app_domain2;
proxy_redirect off;
}
}
Two simple app.js files with some “Hello World!” responses run with forever, listening on port 3000 & 4000 as stated in the upstream part of above NginX files.
When i browse to domain1.com or domain2.com, i get the response i would expect. When i browse to www.domain2.com (the second domain) it’s also the correct response.
But when i browse to www.domain1.com, i get the response of domain2.com.
What am i doing wrong?
ebeecroft
68aa2215160846bca0a00f952c5fdc
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
032f50ee7f7d489db3b05e204fe139
032f50ee7f7d489db3b05e204fe139
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e