Question

virtual host of Site1 change url to site2, and site2 show me the content of site1.

Posted June 20, 2020 142 views
ApacheDNSUbuntu 18.04

I have 3 virtual host.

  • site1: 80
  • site1: 443
  • site2: 80 If I put https://site1.com or https://www.site1.com it redirects fine. If I don’t specify https, it shows me site1 without a certificate, but with the address of site2. www.site1.com => url: site2.com (certificate and content failure of site1). https://www.site1.com = url: site1.com (with certificate). www.site2.com => url: site1 (without certificate). https://www.site2.com = url: site1.com (without certificate). I checked the virtualhost files, but can’t find the problem, can it be something from DNS?

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.

×
1 answer

Hello,

I would recommend, adding a Vhost for site2 for port 443. That way you would not get that problem.

  • My problem was solved, I think it was generating a new certificate with the www and without www, I also think that I checked the virtual hosts so that they had a certificate with https and http. :)
    Also if I remember correctly, I removed a certificate for the IP.

Submit an Answer