Stephan Ferraro wrote: > I just discovered a very strange problem: > phpinfo(); shows that the environment variable SERVER_PORT has the value 80, > but I'm accessing the PHP file on HTTPS on port 443: > > # cat phpinfo.php > <?php > /* > * To change this template, choose Tools | Templates > * and open the template in the editor. > */ > phpinfo(); > ?> > > > $ wget --quiet --no-check-certificate -O - > https://ssl.trashmail.net/phpinfo.php | cat -e | grep SERVER_PORT > <tr><td class="e">SERVER_PORT </td><td class="v">80 </td></tr>$ > <tr><td class="e">_SERVER["SERVER_PORT"]</td><td class="v">80</td></tr>$ > > SERVER_PORT should be 443. > > I ported my application from GNU Gentoo Linux to OpenSolaris. My PHP > application check the server port. Its looks like if its a bug in Apache 2.2 > or PHP 5.2.6? >
Check out http://httpd.apache.org/docs/2.2/mod/core.html#usecanonicalname and related directives ServerName and UseCanonicalPhysicalPort. What level of Apache did you use on Gentoo? Is your Apache configuration the same w.r.t. vhosts and these directives?