Need help with setting up virtual servers to host two domains on one droplet

  • Posted June 8, 2014

First - I created a droplet on Ubuntu 14.04 LTS and gave it the name

Second - I have two domain names pointed to the droplets IP address

Third - I followed the directions here

I did so exactly and using my two domain names is working and is displaying the proper index.html file is showing the apache2 ubuntu default index.html file even though I edited the /etc/apache2/sites-available/ file to show the following:

DocumentRoot /var/www/ ServerName ServerAlias

I double checked to ensure I created the index.html file in the correct directory at /var/www/

Any thoughts as to what is missing?

My goal is to install Wordpress on both sites using the same droplet.


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.

Update: Glad to report that all is well and working fine. <br>Had to run a2dissite 000-default then service apache2 restart All is good now :)

Thank you @Larry Fransson, <br> <br>I ran: <br>sudo a2ensite <br>sudo a2ensite <br> <br>While following the steps in this tutorial <br> <br>Is that what you are referring to?

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. <br>