Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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!
Hi Lisa, this article is great, I completed allá steps and I know you said this is for testing, whether I don’t configure hosts file, how can I get my sites? Thanks again.
This tutorial is very thorough and helpful!
But I wonder if I also have to change <Directory /var/www/html> to <Directory /var/www/example.com/public_html> in /etc/apache2/sites-available/example.com.conf and to <Directory /var/www/test.com/public_html> in /etc/apache2/sites-available/test.com.conf
(I’m using LAMP by DigitalOcean OS Ubuntu 18.04)
Is there any tutorial on how I have to configure my third-party Domains, which have DigitalOcean as their DNS server, to point to the website? I can look up the index.html in that directory using my IP-Adress, but the A-Record that points directly to the IP address can’T establish a connection…
Great article! I was easily able to migrate a site over from another hosting provider and now that the DNS has updated it’s LIVE! Yea!
One question, why do you have “public_html/” and put all files in that dir? Would there ever be files in the example.com/ directory? Just trying to understand if I need the public_html and/or would there ever be a private_files or somesuch?
Thanks!
Would these steps be the same to create a subdomain? In the example above you are using two completely different domain names. I’d like to use one called mywebsite.com & another called support.mywebsite.com
My droplet is already set up using the main domain name. How would you suggest to configure for a subdomain?
Hi there. I have been following this very carefully and made it through almost to the end. I have a question though – If I want to keep the root or Parent site live as is, should I keep the 000-default.conf file activated? Or should I duplicate it and create mysite.co.uk.conf pointing at the route.
I herd you shouldn’t be deactivating this file. So I am a little nervous doing this.
Hope you can help! Phil
Thanks for the guide. I followed it to the letter to enable my two sites. And both work, just not when I do not add the full “https://www” in front of the second…
So the first site just works, whether I type site1.nl or www.example2.com, it loads and is redirected to https (through my .htaccess).
For the second site, however, which has precisely the same settings, same htaccess, same domain settings etc, this does not work. When I type example2.com, www.example2.com, http://example2.com or http://www.example2.com, it just refuses to load. Only when I type https://www.example2.com it will load.
I have tried all kinds of things, like different rules in .htaccess and adding NameVirtualHost * to the conf files. Nothing works. How can I resolve this problem?
Note that ServerName and ServerAlias are stated incorrectly in the guide.
Please correct it from INCORRECT values:
ServerName example.com ServerAlias www.example.com
to CORRECT values:
ServerName www.example.com ServerAlias example.com
I encountered the issue that the setup mentioned in the guide only worked for my first virtual host, but not for my second. Unless a full url was typed (https://www.example.com) the second site would not load. That issue was resolved by making this change.