我正在尝试使用 nginx 设置 Owncloud 4 实例作为网络服务器。主机设备是预装了 Debian 6 的 Raspberry Pi。当我尝试在浏览器中打开 Owncloud 安装的 URL 时,我得到一个No input file specified
.安装被放置在/var/www/owncloud/owncloud
.我用于spawn_fcgi
cgi。
我的 nginx 配置文件/etc/nginx/sites-available/default
如下所示:
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;
}
}
我的/etc/nginx/nginx.conf
看起来像这样:
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/*;
}
你能帮我找出错误配置吗?