By robw
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.
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!
If you had issued a Strict-Transport-Security header at some point your browser saves this information and will reject connecting over plain HTTP in the future, try clearing all browser data.
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.