SCRIPT_FILENAME is defined in /etc/nginx/fastcgi_params . For owncloud
we need to overwrite it, so php gets only the path/filename of the file
to be executed.
Also turn off access_log and 404 logging for robots.txt
I think we don't need to define access.log and error.log since owncloud does the logging automatically in /var/log/access.log and /var/log/error.log. Setting a log level here would even rule out the gui setting in the admin section of owncloud.
…and some little design fixes.
root path is normally /var/www. In default environment $server_name/htdocs throws a 404.
inlude fastcgi.conf throws 'open() "/etc/nginx/fastcgi.conf" failed (2: No such file or directory)', assuming fastcgi_params would be correct.
access_log main throws an 'unknown log format "main"', here I don't know how to fix it, so I commented it out for me. Please look into it!
First github-experience for me. If I could do something better please criticize.
Update Nginx configuration
Fixes a number of potential security holes. Avoids duplication.
TODO: Further restrict locations where .php files can be found.