You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Manuel Vacelet <ma...@gmail.com> on 2008/03/12 10:32:29 UTC

[users@httpd] Path base virtualhost ?

Hello,

I would like to know if it's possible to configure apache in the way
it would answer to urls like 'http://example.com/appname' as it would
serve 'http://appname.example.com/'.
I don't know if I'm clear enough:
- 'appname' is installed in a standalone way on a server
- there is a reverse proxy that is set-up to redirect requests from
users on the right application given the name of this application
(http://example.com/appname, http://example.com/appname2, ...).
- the application 'appname' is designed to run at the root of the
domain name (http://appname.example.com)
- can apache deal with this problem and "fake" that 'appname' is
running in another path on the server ?

I don't know if this could be done with virtualhost or rewrite rules or ...
What is your advise ?

Thanks,
Manuel

---------------------------------------------------------------------
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] Path base virtualhost ?

Posted by Manuel Vacelet <ma...@gmail.com>.
On Thu, Mar 13, 2008 at 6:34 PM, Joshua Slive <jo...@slive.ca> wrote:
>  This is essentially the reverse of what is normally asked for with
>  dynamic virtual hosting.

I know :'(

>  From you message, what I understand is that you app must live at the
>  root of the name-space, but you want it to be accessed as the
>  subdirectory of another server.

This is exactly what I want.

> The only way I know to do that is with
>  a reverse proxy:
>  ProxyPass /appname2 http://appname.example.com
>  ProxyPassReverse /appname2 http://appname.example.com

>  That will work to a degree, but if appname.example.com has links in
>  the html pages that are not relative to the current directory, the
>  client will pop right out of the /appname2 space. In this case, you'll
>  need mod_proxy_html as well. See:
>  http://www.apachetutor.org/admin/reverseproxies

Thanks a lot for all this advises,
Manuel

---------------------------------------------------------------------
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] Path base virtualhost ?

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, Mar 12, 2008 at 5:32 AM, Manuel Vacelet
<ma...@gmail.com> wrote:
> Hello,
>
>  I would like to know if it's possible to configure apache in the way
>  it would answer to urls like 'http://example.com/appname' as it would
>  serve 'http://appname.example.com/'.
>  I don't know if I'm clear enough:
>  - 'appname' is installed in a standalone way on a server
>  - there is a reverse proxy that is set-up to redirect requests from
>  users on the right application given the name of this application
>  (http://example.com/appname, http://example.com/appname2, ...).
>  - the application 'appname' is designed to run at the root of the
>  domain name (http://appname.example.com)
>  - can apache deal with this problem and "fake" that 'appname' is
>  running in another path on the server ?
>
>  I don't know if this could be done with virtualhost or rewrite rules or ...
>  What is your advise ?

This is essentially the reverse of what is normally asked for with
dynamic virtual hosting.

>From you message, what I understand is that you app must live at the
root of the name-space, but you want it to be accessed as the
subdirectory of another server. The only way I know to do that is with
a reverse proxy:
ProxyPass /appname2 http://appname.example.com
ProxyPassReverse /appname2 http://appname.example.com

That will work to a degree, but if appname.example.com has links in
the html pages that are not relative to the current directory, the
client will pop right out of the /appname2 space. In this case, you'll
need mod_proxy_html as well. See:
http://www.apachetutor.org/admin/reverseproxies

Joshua.

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