I'm trying to setup an Owncloud 4 instance with nginx as a webserver. The host device is a Raspberry Pi with preinstalled Debian 6. When I try to open the URL to the Owncloud installation in a browser, I get a No input file specified. The installation is placed in /var/www/owncloud/owncloud. I use spawn_fcgi for cgi.
My nginx configurationfile /etc/nginx/sites-available/default looks like this:
server {
listen 80; ## listen for ipv4
#listen [::]:80 default ipv6only=on; ## listen for ipv6
server_name raspberrypi;
access_log /var/log/nginx/localhost.access.log;
root /var/www/owncloud/owncloud/;
index index.php;
# deny direct access
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
deny all;
}
# default try order
location / {
try_files $uri $uri/ @webdav;
}
# owncloud WebDAV
location @webdav {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_pass 127.0.0.1:9000; # or use php-fpm with: "unix:/var/run/php-fpm/php-fpm.sock;"
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# enable php
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000; # or use php-fpm with: "unix:/var/run/php-fpm/php-fpm.sock;"
}
location /doc {
root /usr/share;
autoindex on;
allow 127.0.0.1;
deny all;
}
location /images {
root /usr/share;
autoindex on;
}
}
My /etc/nginx/nginx.conf looks like this:
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
# multi_accept on;
}
http {
include /etc/nginx/mime.types;
access_log /var/log/nginx/access.log;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
tcp_nodelay on;
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Can you help me to find the misconfiguration?
$document_rootvariable defined? Try definingSCRIPT_FILENAMEasfastcgi_param SCRIPT_FILENAME /var/www/owncloud/owncloud/$fastcgi_script_name;– Marki555 May 29 '12 at 7:52SCRIPT_FILENAMEalso in filefastcgi_params? – Marki555 May 30 '12 at 5:36fastcgi_params. No effect. – hikhvar May 30 '12 at 13:31