apache + mod_ssl + virtualhosts = headaches
Date: 12/14/07
(PHP Community) Keywords: php
this might or might not be php specific, but i'm posting it here because i figured someone might have seen this and figured out a fix.
okay, so i think i found a "feature" of mod_ssl. mod_ssl is supposed to show _SERVER[HTTPS]=on|off at all times even if mod_ssl is not loaded, right?
well, not if you have virtualhosts set up to share port 443, apparantly.
i can see _SERVER[HTTPS] when i visit http://myhost/phpinfo.php and https://myhost/phpinfo.php, but if i go to https://myotherhost/phpinfo.php, i see no _SERVER[HTTPS] variable, but i DO get a secure page served by mod_ssl using the default certificate and no errors. my script is just unable to determine if the page was served through SSL or not due to the lack of _SERVER[HTTPS]
is there something i need to do to get mod_ssl to export those vars to all of the virtualhosts? do i need to generate a new cert or something? any ideas?
Source: http://community.livejournal.com/php/603875.html