Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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; # 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; # or use php-fpm with: "unix:/var/run/php-fpm/php-fpm.sock;"

    location /doc {
            root   /usr/share;
            autoindex on;
            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?

share|improve this question
Where is your $document_root variable defined? Try defining SCRIPT_FILENAME as fastcgi_param SCRIPT_FILENAME /var/www/owncloud/owncloud/$fastcgi_script_name; – Marki555 May 29 '12 at 7:52
This don't fix the error :-( I also get the "No input file specified." message. I also deleted the location /doch and location /imgages part, to avoid a redefined $document_root. Thanks for your help. – hikhvar May 29 '12 at 17:33
Do you have SCRIPT_FILENAME also in file fastcgi_params? – Marki555 May 30 '12 at 5:36
yes. I delete the line in the fastcgi_params. No effect. – hikhvar May 30 '12 at 13:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.