1

我已经安装了 snappy nextcloud ( https://github.com/nextcloud/nextcloud-snap ),将其默认 HTTP 端口更改为 8081 (暂时对 HTTPS 不感兴趣),并使用 Nginx 将反向代理配置为以下 wiki:https://github.com/nextcloud/nextcloud-snap/wiki/Putting-the-snap-behind-a-reverse-proxy。在我尝试配置自定义路径(“/nextcloud”)之前,它可以完美运行,这就是我收到“目录不可用”消息的时候。

在日志文件中,我得到了这个:

{"reqId":"LIwbZZpG3z32bl5uhCsT","level":4,"time":"2018-09-12T03:38:26+00:00","remoteAddr":"127.0.0.1","user":"gabriel-milan","app":"webdav","method":"PROPFIND","url":"\/nextcloud\/remote.phpp\/webdav\/","message":"Exception: {\"Exception\":\"LogicException\",\"Message\":\"Requested uri (\\\/nextcloud\\\/remote.phpp\\\/webdav\\\/) is out of base uri (\\\/nextcloud\\\/remote.php\\\/webdav\\\/)\",\"Code\":0,\"Trace\":\"#0 \\\/snap\\\/nextcloud\\\/8267\\\/htdocs\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1296): Sabre\\\\HTTP\\\\Request->getPath()\\n#1 \\\/snap\\\/nextcloud\\\/8267\\\/htdocs\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(474): Sabre\\\\DAV\\\\Server->checkPreconditions(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/snap\\\/nextcloud\\\/8267\\\/htdocs\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/snap\\\/nextcloud\\\/8267\\\/htdocs\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(80): Sabre\\\\DAV\\\\Server->exec()\\n#4 \\\/snap\\\/nextcloud\\\/8267\\\/htdocs\\\/remote.php(164): require_once('\\\/snap\\\/nextcloud...')\\n#5 {main}\",\"File\":\"\\\/snap\\\/nextcloud\\\/8267\\\/htdocs\\\/3rdparty\\\/sabre\\\/http\\\/lib\\\/Request.php\",\"Line\":214}","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/69.0.3497.81 Safari\/537.36","version":"13.0.5.2"}

这些是我的东西的版本:

Nextcloud version: 13.0.5
Operating system: Debian Stretch
Apache version: 2.4
Nginx version: 1.10.3
PHP version: 7.1
MySQL version: 5.7
Redis version: 4.0

这是我的 Nginx 的 *.conf 文件:

server {
        listen 80;
    listen [::]:80;
        server_name (my_host);

        # Add headers to serve security related headers
        add_header X-Content-Type-Options nosniff;
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Robots-Tag none;
        add_header X-Download-Options noopen;
        add_header X-Permitted-Cross-Domain-Policies none;

    location /nextcloud {
        rewrite ^/nextcloud(.*) /$1 break;
        proxy_pass_header   Server;
        proxy_set_header    Host        $host;
        proxy_set_header    X-Real-IP   $remote_addr;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header    X-Forwarded-Proto $scheme;
        proxy_pass  http://127.0.0.1:8081;
    }

...

}

谁能帮帮我吗?

4

0 回答 0