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, testingdomain.com, I get 301 redirected to domain.com. If I disable the example.com site using a2dissite, then testingdomain.com 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: http://pastebin.com/3GU7vDhg
New site which always redirects to main site: http://pastebin.com/GHd9tqBp
And my ports.conf file if that might help in any way: http://pastebin.com/hWDC2ZbZ
I’ve spent hours trying to find a solution but with no luck : /
Thanks for any help.
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!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!