On Wed, Sep 28, 2011 at 1:18 PM, sawyer x <xsawyerx@gmail.com> wrote:
Such as Git, it sounds complex but it is in fact relatively simple.

You have a virtual host catching all requests to a domain name. It will put it in the context of the virtual host configuration block (<VirtualHost *:80>). You can specify the domain inside it:
<VirtualHost *:80>
    ServerName mydomain.com
    ServerAlias www.mydomain.com
</VirtualHost>

Inside that context, you can have Aliases. These aliases assure that whenever someone requests one thing, Apache will actually submit them another. This helps when you put stuff in different locations but want the users to have the same requests. For example, you want the users to go to mydomain/cgi-bin/script.pl when in fact you want "cgi-bin" to be in a very specific place outside the regular directory. You can have that, and that's what people often use.

1. Put a virtual host for "mydomain"
2. Put an alias from "/myapp/images" to "/public/images"
3. Users reach: mydomain/myapp/images
4. Apache will actually go to /public/images to get the images instead of /myapp/images.

It's that simple.

I think I understand what you're saying but I think you're misunderstanding the problem.  The problem is that he wants to mount TWO apps under different directories:

/prefix1/
/prefix2/

But each of these apps are requesting images like /images/image1.png, and the images overlap.  He wants requests coming from /prefix1/ to service /prefix1/images/image1.png and requests from /prefix2/ to service /prefix2/images/image1.png even though there's no way to tell the server which "prefix" he's under given a request for /images/image1.png.
 

_______________________________________________
Dancer-users mailing list
Dancer-users@perldancer.org
http://www.backup-manager.org/cgi-bin/listinfo/dancer-users