By roscoejack
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!
Hi,
Did you check the webserver logs ? What do the logs have to say ? Could you share your error logs on pastebin ?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.