- I have set up the Django stack
- Using virtual hosts, the domain correctly uses https and redirects all http requests using Virtual Hosts.
I added another Virtual Host so that a HTTP request to the IP address directly (not the domain) redirects to the HTTPS domain (this works). This is what I added in the bitnami.conf file (with dummy IP address and domain name replacing the actual ones): (Couldn't get the < to print properly but they are there)
RedirectMatch /(.*) https://www.mydomain.com
However whenever I access the IP address directly using HTTPs I get the HTTP version not the HTTPs version. If I try to add a Virtual Host like I did with port 80 but using 443 it appears to become a circular redirect (its like the HTTPs IP -> redirects to domain -> redirects to IP)
Any suggestion on what is required to force an HTTPS request to the IP address to the domain would be great (or to somehow use the SSL certificate which is tied to the domain not the IP address or simply disable it would be great. This is more an APACHE issue since the main page is simple html in the htdocs with a link to the Projects in Django.