Report this

What is the reason for this report?

Can't set two domains to direct to separate root folders

Posted on February 4, 2018

Hello everybody, so basically I have two separate domains, that I’m trying to run on the same droplet, but have both domains navigate to separate root folders, being two separate websites. I’ve followed this guide to the LETTER: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

My sites available folder has the following files: 000-default.conf , cybergamegear.com.conf , default-ssl.conf , and delcontedesigns.com.conf. So the two domains I’m trying to set up are DelconteDesigns.com (which works) and CyberGameGear.com (which navigates to DelconteDesigns.com currently for some reason, rather than the root folder I want it to.

Here is what my cybergamegear.com.conf looks like: <VirtualHost *:80> ServerAdmin jonathandelcontedesigns@gmail.com ServerName cybergamegear.com ServerAlias www.cybergamegear.com DocumentRoot /var/www/cybergamegear.com/public_html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>

The only thing I can imagine is that my 000-default.conf is overriding it? Here is what that file looks like:

<VirtualHost *:80>

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html


<Directory /var/www/html>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Do I need to delete this file?

The developer cloud

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

Start building today

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