How I easily serve all files from a directory ?

Audrey Lee audrey.lee.is.me at gmail.com
Wed Sep 29 02:48:32 MSD 2010


I figured it out:

I found a directive:
  autoindex on;

    server {
        listen       8222;
        server_name  localhost;
        autoindex on;

Thanks me!

On Tue, Sep 28, 2010 at 3:44 PM, Audrey Lee <audrey.lee.is.me at gmail.com>wrote:

> Hello nginx people,
>
> is it easy to configure nginx so that it will serve html for a directory?
> I want the html to  list all files in that directory.
>
> My directory would be like this:
>
> nginx/html/mydir/
>
> And I would fill it with files like:
> my.html
> our.txt
> your.jpg
> their.pdf
>
> So if I browse http://audreyis.me/mydir/
>
> I would see links to those files.
>
> I think apache has this feature but I dont want to use apache.
>
> Here is an example of what I am looking for:
>
> http://howto.unixdev.net/dirlist.html
>
> thanks!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100928/ebf64168/attachment-0001.html>


More information about the nginx mailing list