[horde] Does NAT & port-forwarding cause problems

Jan Schneider jan at horde.org
Wed Jul 16 15:03:00 PDT 2003


Zitat von Raj Gandhi <raj_gandhi at yahoo.com>:

> Good point Raj, let me see if I can help.   ( <- humor)
>
> Looking at "PHP Info," the following is observed in PHP Variables:
> _SERVER["HTTP_HOST"]   www.mydomain.com
> _SERVER["SERVER_NAME"]    Redrover
> _SERVER["SERVER_ADDR"]   10.0.0.251
> _SERVER["SERVER_PORT"]   80
>
> Looking in horde/config/registry.php the following lines are interesting:
> $this->applications['horde'] = array(
>    'cookie_domain' => $_SERVER['SERVER_NAME'],
>    'server_name' => $_SERVER['SERVER_NAME'],
>    'server_port' => $_SERVER['SERVER_PORT']
>
> After changing both occurances of SERVER_NAME to HTTP_HOST, my main
> problem goes away.  Therefore, I'm inclined to believe that the default
> registry.php is wrong (or at least a brittle design).  The way it uses
> SERVER_NAME will not work for people like me using NAT and various
> aliasing (port forwarding).

But it is the only way to make it work with virtual hosting that happens far
more often than NATing.

> On the other hand, I'm a novice with networking/DNS/apache and I know
> next to nothing about PHP.  Could someone please let me know if replacing
> SERVER_NAME with HTTP_HOST is appropriate?

In your case, yes.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft



More information about the horde mailing list