[Mailman-Users] Changing site domain name
msapiro at value.net
Sat Oct 7 08:59:27 CEST 2006
Chris Puttick wrote:
>On 06/10/06, Mark Sapiro <msapiro at value.net> wrote:
>> I suspect that adding
>> VIRTUAL_HOST_OVERVIEW = Off
>> to the above will fix the symptom. If it does, the underlying problem
>> is that your web server is setting HTTP_HOST (or if HTTP_HOST is
>> unset, SERVER_NAME) to '10.0.10.18' in the environment passed to the
>> Mailman CGIs.
>Ok, that works. However, AFAICT neither HTTP_HOST nor SERVER_NAME are
OK. so setting VIRTUAL_HOST_OVERVIEW off gets you a host name from
DEFAULT_URL_HOST instead of '10.0.10.18'. Given this and the code in
Utils.get_domain() which is where this comes from, the web server must
be setting '10.0.10.18' as HOST_NAME or SERVER_NAME in the environment
it passes to the CGI. I think that normally, it should pass the name
of the host in the URL that accessed the page, at least in a virtual
hosts configuration, but here it is passing '10.0.10.18'. This is a
web server configuration issue.
Of course, as long as you're not actually using Mailman virtual hosts,
setting VIRTUAL_HOST_OVERVIEW off should be an acceptable solution.
>Setting what I think is the SuSE 10.1 equivalent,
>APACHE_SERVERNAME (in /etc/sysconfig/apache) does not fix the problem,
>but does result in Apache generated documents showing
>lists.openarchaeology.net as its root:
I don't know enough about the above to comment.
>> If that doesn't do it, try the following:
>> In the Mailman install directory, give the command
>> bin/withlist -i
>> Then at the first >>> prompt type
>> from Mailman import Utils
>> at the next prompt type
>Interesting. Following these steps gets me:
Because neither HOST_NAME nor SERVER_NAME is set in the environment you
passed to withlist (assuming VIRTUAL_HOST_OVERVIEW was on when you did
this test) so DEFAULT_URL_HOST is used.
If VIRTUAL_HOST_OVERVIEW is off and you set HOST_NAME in the
environment before you invoke withlist (e.g. in bash
or in tcsh
setenv HOST_NAME junk
) then the above test will give whatever you set for HOST_NAME in the
environment as the result of Utils.get_domain().
>Now I'm confused...
I hope no longer...
>I'll use the VIRTUAL_HOST_OVERVIEW = Off setting for now as I'm not
>assuming this list server will ever be used to hosts lists for
>something other than the openarchaeology domain. Happy to try other
>fixes in the interest of furthering human knowledge ;-).
Other fixes would have to be something that would affect the
environment passed to Mailman's CGIs by the web server. I don't know
this area well enough to suggest what they might be.
Mark Sapiro <msapiro at value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users