By brock
I’m moving four small, simple websites to a new droplet at Digital Ocean. I hope this post will help other new Digital Ocean users, also.
I’ve setup plenty of websites over the years, but as these sites are live elsewhere — and I’ve never configured the “bones” and setup Apache from scratch, etc — I want to make sure that I didn’t miss a step somewhere before flipping the switch at the domain registrar. Thank you.
I setup an Ubuntu 12.04.3 x64 droplet using these instructions: https://www.digitalocean.com/community/articles/how-to-create-your-first-digitalocean-droplet-virtual-server
I used these initial server setup instructions to change the root password, create a user login that isn’t direct root, improve security, etc: https://www.digitalocean.com/community/articles/initial-server-setup-with-ubuntu-12-04
I installed Apache using these instructions: https://www.digitalocean.com/community/articles/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu
These sites are simple HTML/CSS, so MySQL and PHP aren’t even needed. Going directly to the assigned IP address in a web browser displays the default “It works!” HTML page.
As the sites are live on another host at the moment, I didn’t want to point the domain names to the VPS IP address yet, but sample home pages in each of the directories loaded correctly in a browser (i.e. IP Address/directory[site name]/public_html/ loads an HTML page).
Are pages loading in each directory sufficient to determine that the virtual hosts are configured correctly? My assumption is no and this just confirms that the directories are setup correctly.
I found this part of the instructions a little confusing.
Specifically, I setup: A @ [IP Addresss] CNAME www @ NS [1-3] NS1.DIGITALOCEAN.COM, etc.
I believe that is sufficient and correct. Is anything else needed in the hostname file? I would like to have non-www redirect to www, which I can do via .htaccess, if needed, but nothing atypical in terms of subdomains.
I haven’t changed the DNS entries at the domain registrar to point to Digital Ocean’s domain servers yet.
I don’t use e-mail for any of these domain names, so mail server configuration is not needed (I didn’t setup any MX records).
I have logged into the IP address directly via FTP with the non-root default user and uploaded the files in the correct directories and copied over the .htaccess files via SSH, as well.
Is that everything? Can I safely switch over the DNS entries at the domain name registry or have I missed something? Thank you, again.
Perhaps this happens automatically. I couldn’t find documentation about this on Digital Ocean, but I think this might be helpful (although the ServerName already is set as specified by the virtual hosts tutorial): http://stackoverflow.com/questions/10805520/why-doesnt-apache-redirect-my-ip-address-to-the-desired-location-on-my-server
If anything needs to be done to disable/mask/redirect the exposed IP in a web browser and/or there are directly applicable instructions on Digital Ocean, please do let me know that as well. Thank you very much!
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!
To double check the hostnames are setup, you could edit your /etc/hosts file (check google to find location on Windows) and force the new IP for the domains. <br> <br>That way you can check the vhosts without having to change the DNS for everyone :)
Thank you. I did that already. I transferred one over and everything works except for the .htaccess file. I’ll post a new question about that. Thanks, again.
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.