A question can only have one accepted answer. Are you sure you want to replace the current answer with this one?
×Changed your mind?
You previously marked this answer as accepted. Are you sure you want to unaccept it?
Need help with setting up virtual servers to host two domains on one droplet
Posted June 8, 20142.4k views
First - I created a droplet on Ubuntu 14.04 LTS and gave it the name isahappyperson.com
Second - I have two domain names pointed to the droplets IP address
Third - I followed the directions here https://www.digitalocean.com/community/articles/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts
I did so exactly and using my two domain names
ididntsee.com is working and is displaying the proper index.html file
isahappyperson.com is showing the apache2 ubuntu default index.html file even though I edited the /etc/apache2/sites-available/isahappyperson.com.conf file to show the following:
I double checked to ensure I created the index.html file in the correct directory at /var/www/isahappyperson.com/public_html/index.html
Any thoughts as to what is missing?
My goal is to install Wordpress on both sites using the same droplet.
The conf files in sites-available aren't read by Apache. You need a link in sites-enabled to the conf file. Ubuntu many have the a2ensite command available to do that for you- I don't know for sure. If not, you'll need to link it (or copy the conf file) yourself.
The Apache web server is the most popular way to serve web content on the internet. Apache has the ability to serve multiple domains from a single server by using a mechanism called "virtual hosts". If a virtual host is configured correctly for each domain, the web server can correctly route traffic to the appropriate files based on the domain name requested. In this guide, we'll demonstrate how to configure Apache virtual hosts on an Ubuntu 14.04 VPS.