Hello Team,
I have an issue regarding redirection of websites. I have two website on one IP address.Initially main website was http://example.com/ which was working fine if we hit the website by typing either www.example.com or example.com. Website was working fine. But now I have created the virtual host for my another website which is http://example2.com/.This website is also working fine either by typing www.example2.com or example2.com. But now main problem is if I run the main website by www.example.com it is redirecting to second one website(example2.com). Will you please help me may be I have done something wrong while configuration. root path of my file is -www/html/ -main websites file(www.example.com) -example2.com -
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!
I have resolved this issue.I have also created new conf file for the main website(http://example.com/ ) having path /etc/apache2/sites-available/example.com.conf and after that websites start to work.
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.