You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Ian H. Stewart" <ia...@nyro.com> on 2003/12/26 19:03:36 UTC

Re: [users@httpd] Troubles with Multiple Domains Single IP and web redirect

Thank you, but that did not help.

It does not tell me how to alias
a site to another


ie. vhost  mail.foo.com  www.foo.com/webmail/

Ian


Jonas Eckerman wrote:
> 
> On Thu, 25 Dec 2003 20:32:10 -0800, Ian H. Stewart wrote:
> 
> >  Multiple Domains all pointing to single IP.
> 
> http://httpd.apache.org/docs-2.0/vhosts/name-based.html
> 
> Regards
> /Jonas
> 
> --
> Jonas Eckerman, jonas_lists@frukt.org
> http://www.fsdb.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


---------------------------------------------------------------------
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] Troubles with Multiple Domains Single IP and webredirect

Posted by "Ian H. Stewart" <ia...@nyro.com>.
Thanks for all the help.
I will look at this tonight, but I believe the last one
is going to be where I start.

When I say alias, what I mean is that Apple has
included SquirrelMail and it has a Script alias
to /usr/xxx/squirrelmail. All domains have the
alias added if you click WebMail in the Server Admin.

Anyway, I think the feedback has been great.
Sorry if I was confusing and I will definitely
let you know if I have issues. I will also hold onto
this message regarding multiple domains sharing SquirrelMail.

Again thanks for all the great help!

Ian


Jonas Eckerman wrote:
> 
> On Fri, 26 Dec 2003 10:19:25 -0800, Ian H. Stewart wrote:
> 
> > No, Mac OS X has an alias to the webmail directory
> > so the domain does not have the webmail directory
> > in it's actual path.
> 
> This is confusing to me. The webmail stuff has got to be dynamic webcontent, CGI, PHP or something like that. You should be able to place the actual code wherever you want. And what do you mean with Mac OS X has an alias to the webmail directopry? Is this some kind of stuff included with the OS? And does "alias" mean the same as "symbolic link" here?
> 
> > We could do it that way, but
> > what happens if one of the other domains decides they
> > want webmail also.
> 
> You either use a separate webmail application installation for each domain, or you use a webmail application that can understand virtual hosts.
> 
> On one of our web servers we have one installation each of two webmail apps and one wapmail (SWebMail, SquirrelMail and pofHQ wapMAIL). We then have virtual hosts that sets the info the webmail apps need to distinguish between the domainas. Like this:
> 
> <VirtualHost 10.0.6.253>
>     ServerName mail.foo.org
>    ServerAlias mail.foo.org.internal-address
>     DocumentRoot /var/www_webmail
>     SetEnv USERNAME_PREFIX foo_
>     SetEnv MAIL_DOMAIN foo.org
>     SetEnv MAIL_HOST mail.foo.org
>     ScriptAlias /mail /usr/lib/cgi-bin/sqwebmail/sqwebmail
> </VirtualHost>
> 
> <VirtualHost 10.0.6.253>
>     ServerName mail.bar.se
>    ServerAlias mail.bar.se.internal-address
>     DocumentRoot /var/www_webmail
>     SetEnv USERNAME_PREFIX bar_
>     SetEnv MAIL_DOMAIN bar.se
>     SetEnv MAIL_HOST mail.bar.se
>     ScriptAlias /mail /usr/lib/cgi-bin/sqwebmail/sqwebmail
> </VirtualHost>
> 
> As you can see, both domains above pints to the same document root.
> 
> > So I am trying to do a web forwarding type thing
> > but within apache. DNS all points to the same place.
> 
> Forwarding from what to what? The only "forwarding" Apache does is either proxying or redirecting. Would one of thsoe work? You could tell it to redirect all requests for "mail.foo.com" to "www.foo.com/webmail". Using virtual hosts.
> 
> >  There has to be a way to say something like
> 
> >  <virtualhost *:80>
> >  ServerName  mail.foo.com
> >  ServerAlias  mail.foo.com  www.foo.com/webmail/
> >  </virtualhost>
> 
> I'd suggest you reread the documentation for Apache.
> 
> ServerName sepcifies the servers name.
> ServerAlias specifies an alias for the servers name.
> DocumentRoot specifies the path to the document root.
> Alias specifies aliases for paths.
> Redirect redirects the client to something else.
> 
> For more complex stuff, there's also mod_rewrite to play with.
> 
> I really don't understand what you want your config snippet above to accomplish. If you explain what it is you're trying to do, we might be able to help you do it.
> 
> You could do something like:
> 
> <VirtualHost *:80>
>         ServerName www.foo.com
>         DocumentRoor /path_to_foo_site/
> </VirtualHost>
> <VirtualHost *:80>
>         ServerName mail.foo.com
>         DocumentRoot /path_to_foo_site/webmail/
> </VirtualHost>
> 
> Maybe that's what you want to accomplish? Or maybe it's more like:
> 
> <VirtualHost *:80>
>         ServerName www.foo.com
>         DocumentRoor /path_to_foo_site/
> </VirtualHost>
> <VirtualHost *:80>
>         ServerName mail.foo.com
>         Redirect / http://www.foo.com/webmail
> </VirtualHost>
> 
> Or maybe you want something completely different?
> 
> Regards
> /Jonas
> 
> --
> Jonas Eckerman, jonas_lists@frukt.org
> http://www.fsdb.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


---------------------------------------------------------------------
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] Troubles with Multiple Domains Single IP and webredirect

Posted by Jonas Eckerman <jo...@frukt.org>.
On Fri, 26 Dec 2003 10:19:25 -0800, Ian H. Stewart wrote:

> No, Mac OS X has an alias to the webmail directory
> so the domain does not have the webmail directory
> in it's actual path.

This is confusing to me. The webmail stuff has got to be dynamic webcontent, CGI, PHP or something like that. You should be able to place the actual code wherever you want. And what do you mean with Mac OS X has an alias to the webmail directopry? Is this some kind of stuff included with the OS? And does "alias" mean the same as "symbolic link" here?

> We could do it that way, but
> what happens if one of the other domains decides they
> want webmail also.

You either use a separate webmail application installation for each domain, or you use a webmail application that can understand virtual hosts.

On one of our web servers we have one installation each of two webmail apps and one wapmail (SWebMail, SquirrelMail and pofHQ wapMAIL). We then have virtual hosts that sets the info the webmail apps need to distinguish between the domainas. Like this:

<VirtualHost 10.0.6.253>
    ServerName mail.foo.org
   ServerAlias mail.foo.org.internal-address
    DocumentRoot /var/www_webmail
    SetEnv USERNAME_PREFIX foo_
    SetEnv MAIL_DOMAIN foo.org
    SetEnv MAIL_HOST mail.foo.org
    ScriptAlias /mail /usr/lib/cgi-bin/sqwebmail/sqwebmail
</VirtualHost>

<VirtualHost 10.0.6.253>
    ServerName mail.bar.se
   ServerAlias mail.bar.se.internal-address
    DocumentRoot /var/www_webmail
    SetEnv USERNAME_PREFIX bar_
    SetEnv MAIL_DOMAIN bar.se
    SetEnv MAIL_HOST mail.bar.se
    ScriptAlias /mail /usr/lib/cgi-bin/sqwebmail/sqwebmail
</VirtualHost>

As you can see, both domains above pints to the same document root.

> So I am trying to do a web forwarding type thing
> but within apache. DNS all points to the same place.

Forwarding from what to what? The only "forwarding" Apache does is either proxying or redirecting. Would one of thsoe work? You could tell it to redirect all requests for "mail.foo.com" to "www.foo.com/webmail". Using virtual hosts.

>  There has to be a way to say something like

>  <virtualhost *:80>
>  ServerName  mail.foo.com
>  ServerAlias  mail.foo.com  www.foo.com/webmail/
>  </virtualhost>

I'd suggest you reread the documentation for Apache.

ServerName sepcifies the servers name.
ServerAlias specifies an alias for the servers name.
DocumentRoot specifies the path to the document root.
Alias specifies aliases for paths.
Redirect redirects the client to something else.

For more complex stuff, there's also mod_rewrite to play with.

I really don't understand what you want your config snippet above to accomplish. If you explain what it is you're trying to do, we might be able to help you do it.

You could do something like:

<VirtualHost *:80>
	ServerName www.foo.com
	DocumentRoor /path_to_foo_site/
</VirtualHost>
<VirtualHost *:80>
	ServerName mail.foo.com
	DocumentRoot /path_to_foo_site/webmail/
</VirtualHost>

Maybe that's what you want to accomplish? Or maybe it's more like:

<VirtualHost *:80>
	ServerName www.foo.com
	DocumentRoor /path_to_foo_site/
</VirtualHost>
<VirtualHost *:80>
	ServerName mail.foo.com
	Redirect / http://www.foo.com/webmail
</VirtualHost>

Or maybe you want something completely different?

Regards
/Jonas

-- 
Jonas Eckerman, jonas_lists@frukt.org
http://www.fsdb.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] Troubles with Multiple Domains Single IP and webredirect

Posted by "Ian H. Stewart" <ia...@nyro.com>.
No, Mac OS X has an alias to the webmail directory
so the domain does not have the webmail directory
in it's actual path. We could do it that way, but
what happens if one of the other domains decides they
want webmail also. So I am trying to do a web forwarding type thing
but within apache. DNS all points to the same place.

There has to be a way to say something like

<virtualhost *:80>
ServerName  mail.foo.com
ServerAlias  mail.foo.com  www.foo.com/webmail/
</virtualhost>

But it is not working for me so I know I am missing something.


Ian



Bryan Irvine wrote:
> 
> Couldn't you do a document root and point it to
> 
> /var/www/vhost/foo.com/webmail (substitute your directory path here)
> 
> --Bryan
> 
> On Fri, 2003-12-26 at 10:03, Ian H. Stewart wrote:
> > Thank you, but that did not help.
> >
> > It does not tell me how to alias
> > a site to another
> >
> >
> > ie. vhost  mail.foo.com  www.foo.com/webmail/
> >
> > Ian
> >
> >
> > Jonas Eckerman wrote:
> > >
> > > On Thu, 25 Dec 2003 20:32:10 -0800, Ian H. Stewart wrote:
> > >
> > > >  Multiple Domains all pointing to single IP.
> > >
> > > http://httpd.apache.org/docs-2.0/vhosts/name-based.html
> > >
> > > Regards
> > > /Jonas
> > >
> > > --
> > > Jonas Eckerman, jonas_lists@frukt.org
> > > http://www.fsdb.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
> >
> >
> > ---------------------------------------------------------------------
> > 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


---------------------------------------------------------------------
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] Troubles with Multiple Domains Single IP and web redirect

Posted by Bryan Irvine <br...@kingcountyjournal.com>.
Couldn't you do a document root and point it to 

/var/www/vhost/foo.com/webmail (substitute your directory path here)


--Bryan

On Fri, 2003-12-26 at 10:03, Ian H. Stewart wrote:
> Thank you, but that did not help.
> 
> It does not tell me how to alias
> a site to another
> 
> 
> ie. vhost  mail.foo.com  www.foo.com/webmail/
> 
> Ian
> 
> 
> Jonas Eckerman wrote:
> > 
> > On Thu, 25 Dec 2003 20:32:10 -0800, Ian H. Stewart wrote:
> > 
> > >  Multiple Domains all pointing to single IP.
> > 
> > http://httpd.apache.org/docs-2.0/vhosts/name-based.html
> > 
> > Regards
> > /Jonas
> > 
> > --
> > Jonas Eckerman, jonas_lists@frukt.org
> > http://www.fsdb.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
> 
> 
> ---------------------------------------------------------------------
> 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