I'm trying to use nginx as a proxy for a FastCGI go-app. The server serves the regular html-files without problems. However when going to my app directory I receive an 403 error. The error log says
2014/03/11 09:24:27 [error] 14418#0: *3 directory index of "/usr/share/nginx/html/app/" is forbidden, client: 127.0.0.1, server: localhost, request: "GET /app/ HTTP/1.1", host: "localhost"
My nginx.conf is as follows
server {
listen 80;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/;
}
location ~ /app.* {
autoindex on;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
}
try_files $uri $uri.html =404;
}
in the html/app directory the executable is called app and is listening to port 9000. I've set the owner of the app directory and app file to be www-data. And nginx has read, write and execute permissions in the folder.
Any help is greatly appreciated.