#37323 [Bgs]: SERVER_NAME not following apache directive
| From: | mike@php.net | Date: | Fri, 05 May 2006 17:00:19 +0000 |
| Subject: | #37323 [Bgs]: SERVER_NAME not following apache directive | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-96666@lists.php.net to get a copy of this message | ||
ID: 37323
Updated by: mike@php.net
Reported By: jameslporter at gmail dot com
Status: Bogus
Bug Type: Apache2 related
Operating System: Gentoo
PHP Version: 5.1.4
New Comment:
This doesn't have anything to do with the coice of scripting language.
You know that the browser compares the current host name and the one
from the cert?
Previous Comments:
------------------------------------------------------------------------
[2006-05-05 16:55:14] jameslporter at gmail dot com
Yes, the serveralias is to allow users who type www.website.com to view
the site, for our script though it needs to use the ServerName
Directive...I shudder to think of the result of someone who uses
another server alias of www.websiteother.com and websiteother.com and
www.website.com and website.com .....You would have to buy 4 ssl
certs...I think I'll convert our site to .NET before I would do that.
------------------------------------------------------------------------
[2006-05-05 16:52:45] mike@php.net
Well, I somehow doubt there's something to resolve.
I guess you've a ServerAlias directive active.
------------------------------------------------------------------------
[2006-05-05 16:44:43] jameslporter at gmail dot com
What process should we follow to get this resolved?? I assume if it is
an apache problem, then it needs to be sent upstream.
------------------------------------------------------------------------
[2006-05-05 16:32:40] mike@php.net
This is what we get from Apache.
------------------------------------------------------------------------
[2006-05-05 06:00:13] jameslporter at gmail dot com
Description:
------------
$_SERVER[SERVER_NAME] needs to have the value of ServerName Directive
in Apache....it's not..it's using the url (www)...this is definitely
not the expected result and makes this variable useless....makes our
hostname on our SSL Cert not match.
Reproduce code:
---------------
<?php
echo $_SERVER['SERVER_NAME'];
?>
Expected result:
----------------
http://website.com/
website.com
http://www.website.com/
website.com
Actual result:
--------------
http://website.com/
website.com
http://www.website.com/
www.website.com
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37323&edit=1