I'm trying to run two sites on the same droplet, but my new virtual host seems to be having no effect? (Configuration files inside)

Posted September 13, 2014 1.8k views

I’ve had a website running on my droplet for sometime, and now I’m trying to set up a second on the same droplet but with a new domain name.

I’ve set up the directories, created virtual host files for each site, and enabled both sites.

Currently, every time I visit the new domain,, I get 301 redirected to If I disable the site using a2dissite, then loads as expected. So it seems as though the virtual host for the original site is overriding the new one when enabled?

Here are my virtual host files:

Main site which works, and which the other domain is redirecting to:

New site which always redirects to main site:

And my ports.conf file if that might help in any way:

I’ve spent hours trying to find a solution but with no luck : /

Thanks for any help.

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.

Submit an Answer
1 answer


Did you check the webserver logs ? What do the logs have to say ?
Could you share your error logs on pastebin ?