Question
Apache HTTPS site DISabled, but still being redirected to it at the www (non-www works)
This isn’t the most beautiful VirtualHost, but I’ve tried just about everything else. I moved one HTTPS domain to another HTTPS domain (same IP), and want to send all traffic to the old domain to the HTTP site. When I run curl -I example.com
and curl -I www.example.com
I get the same response, but when I go to the websites in any browser, I’m prompted with a “Your connection is not private” error message.
<VirtualHost *:80>
ServerAdmin web@my-website.com
ServerName www.my-website.com
<Directory /home/my-website/old>
AllowOverride all
Options -MultiViews
</Directory>
DocumentRoot /home/my-website/old/
ErrorLog /home/my-website/shared/log/error.log
CustomLog /home/my-website/shared/log/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin web@my-website.com
ServerName my-website.com
<Directory /home/my-website/old>
AllowOverride all
Options -MultiViews
</Directory>
DocumentRoot /home/my-website/old/
ErrorLog /home/my-website/shared/log/error.log
CustomLog /home/my-website/shared/log/access.log combined
</VirtualHost>
I feel like this might be a DNS cache issue somewhere along the lines, but I don’t know how to debug that or confirm my suspicion.
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.
×