Question
DNS Records fails
I am running two node apps on one droplet, and using nginx.
Yesterday I was setting two domains leading to two different ports on my droplet web server:
www.domain.com - > http://localhost:9001
sub.domain.com - > http://localhost:9002
This is what I have done on nginx/sites-available/default to make it happen:
server {
listen 80;
server_name domain.com www.domain.com;
location / {
proxy_pass http://localhost:9001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
server {
listen 80;
server_name sub.domain.com;
location / {
proxy_pass http://localhost:9003;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
It was working perfectly, but now I see that the nginx make the proxy pass only for the main domain, while it does nothing to the sub domain. (yes, both ports are working when accessing m.y.i.p:9002)
Also, I am getting this error on the Digital Ocean DNS log:
dns_master_load: /dev/shm/bind/DO/db.grmmph.com:15: *.grmmph.com: CNAME and other data
zone grmmph.com/IN: loading from master file /dev/shm/bind/DO/db.grmmph.com failed: CNAME and other data
zone grmmph.com/IN: not loaded due to errors.
Any help? Please?
Add a comment
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.
×