You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Carl Brewer <ca...@vivitec.com.au> on 2003/10/22 05:46:52 UTC

[users@httpd] apache 2.0.47 - SERVER_NAME values with server aliases

Hello,

We've just discovered something that seems different
between apache 1 and apache 2 (!).

We use errordocuments that run scripts to log errors
and process them, and we rely on the value of
SERVER_NAME passed to the scripts from httpd.

With apache 1.3, SERVER_NAME is the actual server name,
as defined in a virtualhost directive, but we're
seeing SERVER_NAME in 2.0.47 as the server alias that
the site was connected to as.

This isn't what we want, as it creates a maintenance issue
for us.  We log our site errors to the server_name, and the
aliases are for convenience.

Has anyone seen this before, and knows if I need to set some
variable to get the behaviour we expect?

thanks

Carl

-- 
=======================
Vivitec Pty. Ltd.
Suite 6, 51-55 City Rd.
Southbank, 3006.
Ph. +61 3 8626 5626
Fax +61 3 9682 1000
=======================


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache 2.0.47 - SERVER_NAME values with server aliases

Posted by Carl Brewer <ca...@vivitec.com.au>.
Carl Brewer wrote:

> Has anyone seen this before, and knows if I need to set some
> variable to get the behaviour we expect?

That would be UseCanonicalName ... *doh*



-- 
=======================
Vivitec Pty. Ltd.
Suite 6, 51-55 City Rd.
Southbank, 3006.
Ph. +61 3 8626 5626
Fax +61 3 9682 1000
=======================


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache 2.0.47 - SERVER_NAME values with server aliases

Posted by Robert Andersson <ro...@profundis.nu>.
Carl Brewer wrote:
> This isn't what we want, as it creates a maintenance issue
> for us.  We log our site errors to the server_name, and the
> aliases are for convenience.

I saw you figured it out, but a general suggestion is for one site to only
have exactly one hostname, for the sakes of caching proxies, archives,
search engines etc. Give your site as many aliases you like, but redirect
all of them to the "real" one, where all contents are served from.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org