By Anat Kokarat
I suggest me what are I should to learn I need to create 1 droplet for domain mydomain.com Then I need to have server1.mydomain.com which is use other droplet (different ip) like this on ubuntu 14.04 and nginx server.
Best
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!
You shouldn’t have to use two separate Droplets. You would just use multiple server blocks in your configuration.
server {
server_name mydomain.com;
access_log logs/mydomain.access.log main;
root /var/www/mydomain.com/htdocs;
}
server {
server_name server1.mydomain.com;
access_log logs/server1.mydomain.access.log main;
root /var/www/server1.mydomain.com/htdocs;
}
Create two Ubuntu 14.04 droplets, follow How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 14.04 | DigitalOcean on both, and then set up your DNS records accordingly: How To Set Up a Host Name with DigitalOcean | DigitalOcean.
Your DNS records should look like this:
@ A first droplet's IP address
server1 A second droplet's IP address
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.