quick start on writing a module?

Maxim Dounin mdounin at mdounin.ru
Wed Jun 16 21:26:13 MSD 2010


Hello!

On Wed, Jun 16, 2010 at 06:47:29PM +0200, Piotr Sikora wrote:

[...]

> >This is caused by index module and only applies when uri ends with
> >'/'.  Workarounds are obvious, but I doubt they are actually
> >needed in this particular case.
> 
> Yes, my previous error message was produced by index module,
> but the issue exists and should be probably considered a bug:
> 
> location / {
>  set    $file "/etc/passwd";
>  alias  $file;
> }
> 
> "GET /aaa" results in:

[...]

> *4 open() "/etc/passwdaaa" failed (2: No such file or directory)"

No, it's not bug, it works as documented.  Alias specifies full 
path only in regexp locations (with captures).  For normal locations 
it specifies path to point matched by location (even if alias 
contains variables).

Maxim Dounin



More information about the nginx mailing list