[Mailman-Users] Mailman-2.1.1 + Virtual Hosting HOWTO - ARCHIVES.

Richard Barrett r.barrett at openinfo.co.uk
Sat Jun 21 11:14:41 CEST 2003

At 16:14 20/06/2003, ODHIAMBO Washington wrote:

>Hello ALL,
>Since this question comes up every now and then, here is my contribution.
>Kindly add what you believe is needed, for the archives.
>Someone more experienced can comment/edit/update this HOWTO. I just went 
>the steps today and while it works for me, I am not guaranteeing it will work
>for everyone.
>I am running Mailman-2.1.1 on FreeBSD 4.8-STABLE (not important). I have 
>and Apache-1.3.27.
>Here is how I did it:
>The installation of Apache to handle virtual hosts and the installation of 
>to handle the same is beyond the scope of this mini-HOWTO.
>#This is how to add virtual hosting to mailman.
># 20030620
>STEP 1. Edit the dns zone file for the domain name to have a suitable host for
>         the virtual domain. The MX for this host should be 
> mail.wananchi.com and
>         longonot.wananchi.com, e.g.
>         lists           IN      A
>                         IN      MX      10      mx1.domain.tld.
>                         IN      MX      20      mx2.domain.tld.
>         Increment the serial and then reload the zone. here hosts 
> Apache as
>         well as the MTA. I did this because I have some virtual domains 
> who host their
>         own MX servers.... I therefore could override the mail handling 
> for the list.
>STEP 2:
>       Edit your MTAs relay maps add the FQDN you added above, e.g.
>       lists.domain.name.
>STEP 3:
>       Edit your Apache config to add a virtual host for the FQDN from (2) 
> above. In my
>       case I use an INCLUDE directive to incorporate a config file for 
> VHosts alone.
>       My sample VHost config is:
>       <VirtualHost *:80>
>        ServerName lists.domain.tld
>        ServerAdmin admin at domain.tld
>        DocumentRoot /usr/local/mailman/lists/list-name
>        ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
>        Alias /pipermail/ /usr/local/mailman/archives/public/
>       </VirtualHost>
>With that I could access http://lists.domain.tld/mailman/admin/
>I could not access http://lists.domain.tld/ - access was denied. Someone 
>comment on the correct way for this as I am sure I missed a point.

Probably because there is no index.html file in 
/usr/local/mailman/lists/list-name DocumentRoot (I assume listname in this 
path is a placeholder for some concrete list's name) and the files in there 
are typically not other readable and even if they were you would not want 
to publish them through your web server..

I find your choice of DocumentRoot for the virtual host confusing as this 
is what the / URI will resolve to. If you are only publishing MM stuff 
through the virtual host then I would use a rewrite rule like this:

         RewriteRule ^(|/(|index.html|(pipermail|mailman)(|/)))$ 
/mailman/listinfo  [PT]

so that any URI at or above /mailman/ or /pipermail/ gets handled as 
request for the URI /mailman/listinfo

>         (a) Open /usr/local/mailman/Mailman/mm_cfg.pf for editing and append
>             the FQDN from (2) above to the following entry. Please follow the
>             format STRICTLY.
>         VIRTUAL_HOSTS        = {'lists.domain.tld':'lists.domain.tld',
>                                 'lists.domani2.org':'lists.domain2.org',
>                                 'lists.domain3.net':'lists.domain3.net',
>                                 'FQDN':'FQDN'}
>         (b) Add an extra entry for the FQDN to the entries below
>NB: Here again I was not quite sure I needed both steps (a) and (b), but hey
>     I said it works for me. Please modify this if you know what is better.
>STEP 5: Run the following commands.
>(a) /usr/local/mailman/bin/newlist list-name at FQDN
>     Answer the questions prompted carefully. Take note of the answers you 
> give.
>     They will be needed later. You are warned.
>(b) /usr/local/mailman/bin/withlist -l -r fix_url list-name -u FQDN -v
>NB: Change the paths to reflect yours.
>That is how I did it.
>Comments on any suitable changes I need to make are welcome.
>         cheers
>        - wash
>Odhiambo Washington, wash at wananchi.com  . WANANCHI ONLINE LTD (Nairobi, KE)  |
>http://ns2.wananchi.com/~wash/          . 1ere Etage, Loita Hse, Loita St.,  |
>GSM: (+254) 722 743 223                 . # 10286, 00100 NAIROBI             |
>"Oh My God! They killed init! You Bastards!"

Richard Barrett                                      http://www.openinfo.co.uk

More information about the Mailman-Users mailing list