List Info

Thread: mod_alias vs. conditinal configuration




mod_alias vs. conditinal configuration
country flaguser name
Germany
2007-12-13 15:27:03
This is regarding to http://trac
.lighttpd.net/trac/ticket/1427

The problem is that this config snippet:

        alias.url += ( "/a/" =>
"/home/olaf/a/" )

        $HTTP["remoteip"] == "127.0.0.1"
{
	        alias.url += ( "/doc/" =>
"/usr/share/doc/" )
        }

        alias.url += ( "/b/" =>
"/home/olaf/b/" )

Does not do what anyone not familiar with lighttpd internals
would
expect: the alias for "/b/" doesn't work. Moving
it before the
conditional works. (When accessing via localhost).

The first reply to the ticket, from "moo", claims
that this is
intentional. If so, it's a really strange decision, and
undocumented.
Anyone want to comment? Jan?

Regards,
Steve
-- 
Steve Greenland
    The irony is that Bill Gates claims to be making a
stable operating
    system and Linus Torvalds claims to be trying to take
over the
    world.       -- seen on the net


Re: mod_alias vs. conditinal configuration
country flaguser name
Germany
2007-12-13 21:49:32
On 2007-12-13 21:27:03 +0000, Steve Greenland wrote:
> This is regarding to http://trac
.lighttpd.net/trac/ticket/1427
> 
> The problem is that this config snippet:
> 
>         alias.url += ( "/a/" =>
"/home/olaf/a/" )


>         $HTTP["remoteip"] ==
"127.0.0.1" {
> 	        alias.url += ( "/doc/" =>
"/usr/share/doc/" )
            at this point the alias list is copied and the
/doc is
            appended. so you get a and doc

>         }
> 
>         alias.url += ( "/b/" =>
"/home/olaf/b/" )

          so at this point you get the alias a and b.

> 
> Does not do what anyone not familiar with lighttpd
internals would
> expect: the alias for "/b/" doesn't work.
Moving it before the
> conditional works. (When accessing via localhost).
> 
> The first reply to the ticket, from "moo",
claims that this is
> intentional. If so, it's a really strange decision, and
undocumented.
> Anyone want to comment? Jan?

yes it is hard to get at first place. but yes that is how
the code works
atm.

lighttpd -tp -f /path/to/conf

if you want to see how lighttpd sees the config internally.

    darix

-- 
           openSUSE - SUSE Linux is my linux
               openSUSE is good for you
                   www.opensuse.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )