You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matt Pearce <ma...@swiftdsl.com.au> on 2003/10/17 10:14:15 UTC

[users@httpd] Newbie: Can this be done ?? If so what is it called ??

Hi All,

I am new to apache and have been trying for a few days now to work out how
to get http://webmail.XXXXXX.com.au/cgi-bin/openwebmail/openwebmail.pl to
open when someone goes to http://webmail.XXXXXX.com.au .

I have set the root directory as /usr/local/www and this cant be changed as
openwebmail needs other files from the /usr/local/www/data/openwebmail
directory and the openwebmail conf file sets the paths from the root
directoty.

I run FreeBSD 4.8 with apache 1.3.28 .

If anyone can point me in the right direction and tell me if this is
possible, and if it is, what it is called.  Any help would be greatly
appreciated.

Thanks,

Matt.


---------------------------------------------------------------------
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] Newbie: Can this be done ?? If so what is it called ??

Posted by Matt Pearce <ma...@swiftdsl.com.au>.
Many thanks to Robert and Roger for the quick response.  I tried both ways
suggested and both seem to work well and do what I want.  I will probably go
with the redirectmatch as thats what I have been working with unsuccessfully
as I wasnt sure if I was even looking in the right place.

Thanks once again guys, you have just saved me a bit of hair :-)

Matt.


----- Original Message ----- 
From: "Matt Pearce" <ma...@swiftdsl.com.au>
To: <us...@httpd.apache.org>
Sent: Friday, October 17, 2003 6:14 PM
Subject: [users@httpd] Newbie: Can this be done ?? If so what is it called
??


> Hi All,
>
> I am new to apache and have been trying for a few days now to work out how
> to get http://webmail.XXXXXX.com.au/cgi-bin/openwebmail/openwebmail.pl to
> open when someone goes to http://webmail.XXXXXX.com.au .
>
> I have set the root directory as /usr/local/www and this cant be changed
as
> openwebmail needs other files from the /usr/local/www/data/openwebmail
> directory and the openwebmail conf file sets the paths from the root
> directoty.
>
> I run FreeBSD 4.8 with apache 1.3.28 .
>
> If anyone can point me in the right direction and tell me if this is
> possible, and if it is, what it is called.  Any help would be greatly
> appreciated.
>
> Thanks,
>
> Matt.
>
>
> ---------------------------------------------------------------------
> 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
>
>
>


---------------------------------------------------------------------
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] Newbie: Can this be done ?? If so what is it called ??

Posted by Robert Andersson <ro...@profundis.nu>.
Matt Pearce wrote
:> I am new to apache and have been trying for a few days now to work out
how
> to get http://webmail.XXXXXX.com.au/cgi-bin/openwebmail/openwebmail.pl
> to open when someone goes to http://webmail.XXXXXX.com.au .

How about this?

    <VirtualHost *>
        ServerName webmail.domain.com.au
        RedirectMatch ^/$ http://webmail.domain.com.au/path/to/webmail
    </VirtualHost>
    (Substitute /path/to/webmail with yours, I cut it so it would wrap)

Lookup RedirectMatch in the docs if you're not familiar with it.

If you are using a wild-card ServerAlias (eg. webmail.*) with or without
mod_vhost_alias, I think you need to use mod_rewrite to do the equivalent
while keeping the original hostname.

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


RE: [users@httpd] Newbie: Can this be done ?? If so what is it called ??

Posted by Roger Lipscombe <ro...@differentpla.net>.
> I am new to apache and have been trying for a few days now to 
> work out how to get 
> http://webmail.XXXXXX.com.au/cgi-bin/openwebmail/openwebmail.p
> l to open when someone goes to http://webmail.XXXXXX.com.au .

Just drop an index.html file in the DocumentRoot with the following
contents:

<html>
<head>
<meta http-equiv="Refresh" CONTENT="2;
URL=/cgi-bin/openwebmail/openwebmail.pl">
</head>
<body>
<p>Click <a href="/cgi-bin/openwebmail/openwebmail.pl">here</a>.</p>
</body>
</html>

You can do more complex stuff in httpd.conf, but this (IMO) is simpler.

Cheers,
Roger.


---------------------------------------------------------------------
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