This question either has an incredibly simple answer, or none at all. In either case I cannot find a straight-forward explanation on how to configure a virtual host for squirrelmail to take a host name directly to the user interface without adding /webmin to it. If I try to connect to http://webmail.harte-lyne.ca with the virtual server configured with "DocumentRoot /usr/share/squirrelmail" then I end up at the default CentOS server configuration page. However if I connect to http://webmail.harte-lyne.ca/webmail with "Alias /webmail /usr/share/squirrelmail" then I bring up the squirrelmail user logon page. My squirrelmail.conf contents (as of this writing) are: # # SquirrelMail is a webmail package written in PHP. # <Directory /usr/share/squirrelmail> RewriteEngine on RewriteCond %{SERVER_PORT} !=443 RewriteRule ^.* - [F] ErrorDocument 403 https://xxxxxxx.harte-lyne.ca/webmail </Directory> Alias /webmail /usr/share/squirrelmail <VirtualHost> ServerAlias webmail.* ServerAdmin xxxxxxxx@harte-lyne.ca DocumentRoot /usr/share/squirrelmail <Directory /usr/share/squirrelmail> DirectoryIndex index.php RewriteEngine on RewriteCond %{SERVER_PORT} !=443 RewriteRule ^.* - [F] ErrorDocument 403 https://webmail.harte-lyne.ca/webmail </Directory> Alias /webmail /usr/share/squirrelmail </VirtualHost> What I desire is for users to reach the webmail interface directly from a host name and not require them to append /webmail to the base url. What configuration directives do I need to accomplish this? -- *** e-mail is NOT a secure channel *** James B. Byrne mailto:ByrneJB.<token>@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3CE delivery <token> = hal
James B. Byrne wrote:> > What I desire is for users to reach the webmail interface directly > from a host name and not require them to append /webmail to the base > url. What configuration directives do I need to accomplish this? >I think what you need is something like: Redirect permanent http://webmail.harte-lyne.ca https://webmail.harte-lyne.ca/webmail -- Micha Silver Arava Development Co +972-8-6592270
On Mon, 21 Mar 2005 10:43:09 +0200 Micha Silver <micha@arava.co.il> wrote:> James B. Byrne wrote:>> >> What I desire is for users to reach the webmail interface >> directly from a host name and not require them to append >> /webmail to the base url. What configuration directives >> do I need to accomplish this? >>Micha Silver <micha@arava.co.il> replied:> I think what you need is something like: Redirect permanent > http://webmail.harte-lyne.ca > https://webmail.harte-lyne.ca/webmailThis does not work. The altered configuration file is: # # SquirrelMail is a webmail package written in PHP. # Alias /webmail /usr/share/squirrelmail Redirect permanent http://webmail.harte-lyne.ca \ https://webmail.harte-lyne.ca/webmail <Directory /usr/share/squirrelmail> RewriteEngine on RewriteCond %{SERVER_PORT} !=443 RewriteRule ^.* - [F] ErrorDocument 403 https://inet07.hamilton.harte- lyne.ca/webmail </Directory> <VirtualHost> ServerAlias webmail.* ServerAdmin postmaster.webmail@harte-lyne.ca DocumentRoot /usr/share/squirrelmail <Directory /usr/share/squirrelmail> Order allow,deny Allow from all DirectoryIndex index.php RewriteEngine on RewriteCond %{SERVER_PORT} !=443 RewriteRule ^.* - [F] ErrorDocument 403 https://inet07.hamilton.harte- lyne.ca/webmail </Directory> Alias /webmail /usr/share/squirrelmail </VirtualHost> http://webmail.harte-lyne.ca/ goes to the CentOS page http://webmail.harte-lyne.ca/webmail goes to squirrelmail This is an esoteric exercise for me so any of you with extensive experience in url rewriting please feel free to offer any advice. As far as I can see the presence of the index.php in /usr/share/squirrelmail should work straight off without any need for this but it does not. Regards, Jim -- *** e-mail is not a secure channel *** mailto:byrnejb.<token>@harte-lyne.ca James B. Byrne Harte & Lyne Limited vox: +1 905 561 1241 9 Brockley Drive fax: +1 905 561 0757 Hamilton, Ontario <token> = hal Canada L8E 3C3
James B. Byrne wrote:> >http://webmail.harte-lyne.ca/ goes to the CentOS page >http://webmail.harte-lyne.ca/webmail goes to squirrelmail > > >Jim: I''m not sure why this is not working for you. When I click on the above link(with the /webmail), I''m redirected to: https://inet07.hamilton.harte-lyne.ca/webmail/src/login.php Do you have other virtual domains? What order are they in? (order matters! The first hit is the one used) What''s the ServerName ? You might try: Redirect permanent http://webmail.harte-lyne.ca https://inet07.hamilton.harte-lyne.ca/webmail/src/login.php (all on one line, of course) Good luck, Micha>This is an esoteric exercise for me so any of you with extensive >experience in url rewriting please feel free to offer any advice. >As far as I can see the presence of the index.php in >/usr/share/squirrelmail should work straight off without any need >for this but it does not. > >Regards, >Jim > >-- > *** e-mail is not a secure channel *** >mailto:byrnejb.<token>@harte-lyne.ca >James B. Byrne Harte & Lyne Limited >vox: +1 905 561 1241 9 Brockley Drive >fax: +1 905 561 0757 Hamilton, Ontario ><token> = hal Canada L8E 3C3 > >
>What I desire is for users to reach the webmail interface >directly from a host name and not require them to append >/webmail to the base url. What configuration directives >do I need to accomplish this?It seems your httpd.conf should work as-is given the VirtualHost container you have, even without the Redirect directive. Just curious, does <VirtualHost *> help any? p.s. Of course, any changes to httpd.conf need to be followed by a httpd restart. johnn