How to host a sub domain on another droplet ?

  • Posted March 24, 2013

I want to host the www (main domain ) on one droplet and the subdomain on another droplet (ip).

I’ve set up a LEMP stack on both droplets and created an A record on the DNS section for the sub domain.

but it’s not working, what else I should do ?

when I type the address of sub domain it gives me this err:

“Oops! Google Chrome could not find

PS: main domain is working properly


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

First step is to ping the subdomain to make sure that it resolves to the IP of the second server. If it does that means that the DNS is setup correctly. <br> <br>After that just browse to the IP of the second server in your browser: <br>http://xx.xx.xx.xx <br> <br>This will allow you to test if your web server is working on the second virtual machine. You can also configure nginx to return the same content as the subdomain on the IP this way you can test to make sure that your nginx config is correct. <br> <br>If both of the above are true then the subdomain should be working for you in the browser.