On 2011-12-16 10:53, Raoul Bhatia [IPAX] wrote:
On 2011-12-12 16:44, Jeroen van Meeuwen (Kolab Systems) wrote:
On 2011-11-28 10:09, Raoul Bhatia [IPAX] wrote:
On 2011-09-23 19:16, Raoul Bhatia [IPAX] wrote:
please review the following patch.
i find this information very useful and maybe it would be wise to make $_SERVER['SERVER_NAME'] the default setting. (at least, we're doing it for our deployments)
--- main.inc.php (revision 2771) +++ main.inc.php (working copy) @@ -219,7 +219,7 @@ // must be greater than 'keep_alive'/60 $rcmail_config['session_lifetime'] = 10;
-// session domain: .example.org +// session domain: .example.org or $_SERVER['SERVER_NAME'] $rcmail_config['session_domain'] = '';
// Backend to use for session storage. Can either be 'db' (default) or 'memcache'
anyone?
FWIW, the $_SERVER["SERVER_NAME"] is often not the same as the $_SERVER["HTTP_HOST"].
indeed. to my knowledge, HTTP_HOST is set to the "Host:" header sent by the client and SERVER_NAME is set to the Apache Vhost Name/Alias.
so to me, SERVER_NAME sounds the right choice.
in my setup, i have a dedicated webmail vhost with no ServerAlias for roundcube - so SERVER_NAME seems the most appropriate value.
HTTP_HOST is the more appropriate, as it will fit both the situation in which the Host: header matches the ServerName, as well as any ServerAlias, as well as any undefined virtual host name or alias that just so happens to end up on the virtualhost (with multiple virtualhosts, if the Host: header doesn't match with any of the virtualhosts' ServerName nor ServerAlias configuration values, the first virtualhost is used).
Setting the value to SERVER_NAME however restricts use to the Host: header matching the ServerName configuration directive exactly (and not the ServerAlias).
Kind regards,
Jeroen van Meeuwen