i just config nginx like this
server {
listen 80;
server_name mydomain.com www.mydomain.com;
location / {
proxy_pass http://167.172.192.169:7000;
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 app.mydomain.com;
location / {
proxy_pass http://167.172.192.169:38453;
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;
}
}
i want sudomain app run in other node app but i still get stuck here, did i need config and DNS ??? pls help
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
Yes indeed you are correct, you would still need to set up an A record for your subdomain name to point to your droplet’s IP address.
If you are using DigitalOcean’s Nameservers, you could take a look at this tutorial on how to setup DNS records:
https://www.digitalocean.com/docs/networking/dns/how-to/manage-records/
Once you make the change, it can take up to 48 hours for the DNS cache to clear over the Globe before you could see the changes.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.