I've never setup SSL before and I think I got it to work and everything works right, but I have this odd issue right now. Lets say my website is called www.example.com. I also have a staging.example.com site on the same server. Someone who was using staging a little while ago was actually editing the production site. After some investigation I found out that https://staging.example.com is actually www.example.com! By using HTTPS it defaults to the the production site.
I'm assuming the issue is that if you put in the IP address of the server, it brings up the production site and https is just directing people to that. Is there a way to work around this or disable HTTPS for staging? Thanks.
To prevent someone accessing the production site with
https://staging.example.com
, you'll want to separate those requests out from the production requests.The simpler way to do it would be something like this:
If for some reason you're not able to mess with
NameVirtualHost
, you can also get the same effect (but a bit less efficient) with some mod_rewrite:HTTPS does not support virtualhosts. When you access a HTTPS site, no matter what domain name you have typed in, you'll get the default SSL virtualhost for that IP.