apache2 https redirect to http without ssl cert

Solution 1:

Configure any certificate for your VirtualHost *:443 and you are done.

  • Could be simply a self-signed certificate that you generate for yourself. Of course user will see a security warning. This is expected. Users specifically want https where s stands for secure. You don't hold a valid certificate for exampleWithoutHttps.com, hence you cannot give them security - it's correct they are warned about that.
  • You could also get a valid cert for free from a couple of vendors.

Place the VirtualHost *:443 of ServerName exampleWithoutHttps.com before VirtualHost *:443 of ServerName exampleWithHttps.com. I mean place it textually as the first one in the Apache's configuration files. This ensures user will not see content from exampleWithHttps.