[Dancer-users] Global app-wide "prefix" settings

Brian E. Lozier brian at massassi.com
Wed Sep 28 22:21:17 CEST 2011


On Wed, Sep 28, 2011 at 1:18 PM, sawyer x <xsawyerx at 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 at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110928/e3a53bed/attachment.htm>


More information about the Dancer-users mailing list