私のubuntu 12.04マシンにnginxがインストールされている特定のディレクトリを追加するときに、デフォルトの構成を使用しています。
server {
        #listen   80; ## listen for ipv4; this line is default and implied
        #listen   [::]:80 default ipv6only=on; ## listen for ipv6
        index index.html index.htm;
        # Make site accessible from http://localhost/
        server_name localhost;
        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to index.html
                root /username/test/static;
                try_files $uri $uri/ /index.html;
                # Uncomment to enable naxsi on this location
                # include /etc/nginx/naxsi.rules
        }
...
...
}
単純な静的nginxサーバーで、そのディレクトリからファイルを提供したいだけです。しかし、error.log私が見るチェック
2014/09/10 16:55:16 [crit] 10808#0: *2 stat() "/username/test/static/index.html" failed (13: Permission denied), client:, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "domain"
2014/09/10 16:55:16 [error] 10808#0: *2 rewrite or internal redirection cycle while internally redirecting to "/index.html
私はすでにを実行しchown -R www-data:www-dataましたが/username/test/static、に設定しましたchmod 755。他に何を設定する必要があるのかわかりません。
www-data、ユーザ缶cdの/username/test/staticディレクトリ:sudo -u www-data cd /username/test/static