You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jiongliang Zhang <zh...@gmail.com> on 2010/01/16 14:29:31 UTC

[users@httpd] How to set multisites: same domain, different path, one ip address

I have implement something like this:

<virtualhost :80>
    mailman is here,
</virtualhost>

<virtualhost :8080>
    redmine is here.
</virtualhost>

so when I using mydomain:80 and mydomain:8080, I can request both of them.
But now I have new reqirements, I hope using mydomain/mailman and
mydomain/redmine
to identify them, just like:

    http://mydomain/mailman
    http://mydomain/redmine

on ubuntu server 8.04, apache2.2, ip: 192.168.1.128, domain: mydomain

mailman path:  /var/lib/mailman/*
redmine path: /var/lib/redmine/*

How can I do this. (I'm newbee on apache)

---
Best regards!
Thanks
Jiongliang Zhang

Re: [users@httpd] How to set multisites: same domain, different path, one ip address

Posted by Jiongliang Zhang <zh...@gmail.com>.
2010/1/18 Krist van Besien <kr...@gmail.com>

> 2010/1/16 Jiongliang Zhang <zh...@gmail.com>:
>
> > so when I using mydomain:80 and mydomain:8080, I can request both of
> them.
> > But now I have new reqirements, I hope using mydomain/mailman and
> > mydomain/redmine
> > to identify them, just like:
> >
> >     http://mydomain/mailman
> >     http://mydomain/redmine
> >
> > on ubuntu server 8.04, apache2.2, ip: 192.168.1.128, domain: mydomain
> >
> > mailman path:  /var/lib/mailman/*
> > redmine path: /var/lib/redmine/*
> >
> > How can I do this. (I'm newbee on apache)
>
> What you need to know first is that:
>
> http://mydomain/mailman
> http://mydomain/redmine
>
> Are just two paths on one server instance. So forget about
> virtualhosts, you don't need them. Just get your http://mydomain
> server working first.
>
> Then once that works you can add aliase to your config. So it would
> look like this:
>
>
> Alias /mailman /var/lib/mailman
> Alias /redmine /var/lib/redmine
>

Many thanks first.

It works for me at first link, but after I enter into the web site, just
like http://mydomain/redmine, all links cann't change to
http://mydomain/redmine/* as their header, for example:

Redmine website has path : /login, and the normal way (no Alias), the web
space is: http://mydomain/login, when I use
Alias directive, the homepage, can use http://mydomain/redmine to access,
but the /login, cann't change to
http://mydomain/redmine/login, it's still http://mydomain/login. Can I
change its links by Apache?

PS: Redmine (http://www.redmine.org), is deployed: Ubuntu8.04 server +
Apache2.2 Proxy + Mongrel Cluster.

-- 
Best regards!
Thanks
Jiongliang Zhang

Re: [users@httpd] How to set multisites: same domain, different path, one ip address

Posted by Krist van Besien <kr...@gmail.com>.
2010/1/16 Jiongliang Zhang <zh...@gmail.com>:

> so when I using mydomain:80 and mydomain:8080, I can request both of them.
> But now I have new reqirements, I hope using mydomain/mailman and
> mydomain/redmine
> to identify them, just like:
>
>     http://mydomain/mailman
>     http://mydomain/redmine
>
> on ubuntu server 8.04, apache2.2, ip: 192.168.1.128, domain: mydomain
>
> mailman path:  /var/lib/mailman/*
> redmine path: /var/lib/redmine/*
>
> How can I do this. (I'm newbee on apache)

What you need to know first is that:

http://mydomain/mailman
http://mydomain/redmine

Are just two paths on one server instance. So forget about
virtualhosts, you don't need them. Just get your http://mydomain
server working first.

Then once that works you can add aliase to your config. So it would
look like this:


Alias /mailman /var/lib/mailman
Alias /redmine /var/lib/redmine


Krist

-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
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] How to set multisites: same domain, different path, one ip address

Posted by Jiongliang Zhang <zh...@gmail.com>.
2010/1/16 Francois Gingras <fr...@gmail.com>

> 2010/1/16 Jiongliang Zhang <zh...@gmail.com>:
> > I have implement something like this:
> >
> > <virtualhost :80>
> >     mailman is here,
> > </virtualhost>
> >
> > <virtualhost :8080>
> >     redmine is here.
> > </virtualhost>
> >
> > so when I using mydomain:80 and mydomain:8080, I can request both of
> them.
> > But now I have new reqirements, I hope using mydomain/mailman and
> > mydomain/redmine
> > to identify them, just like:
> >
> >     http://mydomain/mailman
> >     http://mydomain/redmine
> >
> > on ubuntu server 8.04, apache2.2, ip: 192.168.1.128, domain: mydomain
> >
> > mailman path:  /var/lib/mailman/*
> > redmine path: /var/lib/redmine/*
> >
> > How can I do this. (I'm newbee on apache)
>
>


> Use an alias:
>
> http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias
>
> Frank
>

I tried the alias, but it doesn't work. Is Alias just for filesystem? But
this requirement
should be set to mapping web site, a web site may be started in a
virtualhost tag, so, the
alias cannot map to http://.... or servername value? any ideas?

-- 
Best regards!
Thanks
Jiongliang Zhang

Re: [users@httpd] How to set multisites: same domain, different path, one ip address

Posted by Francois Gingras <fr...@gmail.com>.
2010/1/16 Jiongliang Zhang <zh...@gmail.com>:
> I have implement something like this:
>
> <virtualhost :80>
>     mailman is here,
> </virtualhost>
>
> <virtualhost :8080>
>     redmine is here.
> </virtualhost>
>
> so when I using mydomain:80 and mydomain:8080, I can request both of them.
> But now I have new reqirements, I hope using mydomain/mailman and
> mydomain/redmine
> to identify them, just like:
>
>     http://mydomain/mailman
>     http://mydomain/redmine
>
> on ubuntu server 8.04, apache2.2, ip: 192.168.1.128, domain: mydomain
>
> mailman path:  /var/lib/mailman/*
> redmine path: /var/lib/redmine/*
>
> How can I do this. (I'm newbee on apache)
>
> ---
> Best regards!
> Thanks
> Jiongliang Zhang
>

Use an alias:

http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias

Frank

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