Howto force text type of dir/subdir/file?

wishmaster artemrts at ukr.net
Wed May 29 16:11:06 UTC 2013



 --- Original message ---
From: "Patrick Lists" <nginx-list at puzzled.xs4all.nl>
Date: 29 May 2013, 17:35:18

 
> Hi,
> 
> On a CentOS 6.4 box with nginx 1.4.1 I would like to expose 
> /usr/share/doc/* as <domain>/doc so I can easily browse the docs from 
> the installed packages.
> 
> Config I have right now (thanks Nodex on irc for pointing me to types):
> 
> # docs
> location /doc {
> alias /usr/share/doc/;
> autoindex on;
> types { }
> default_type text/plain;
> }

 What is in log?

Also, from nginx docs:

 When location matches the last part of the directive’s value:

    location /images/ {
        alias /data/w3/images/;
    }

it is better to use the root directive instead:

    location /images/ {
        root /data/w3;
    }









More information about the nginx mailing list