我按照https://blog.ssdnodes.com/blog/installing-nextcloud-docker/上的指南运行了docker容器。我将nextcloud-proxy的端口映射更改为7443:443,780:80,因为我的服务器已经运行了一个apache。
当我打开页面foo.bar.com:7443时,它显示了一个服务器错误500页by nginx。
docker logs --details nextcloud-proxy
只向我显示错误-500页已成功交付。
docker logs --details nextcloud-app
不会显示有关该请求的任何错误。它只在启动时显示一些消息:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.5. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.5. Set the 'ServerName' directive globally to suppress this message
[Mon Mar 04 19:23:01.413561 2019] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.2.15 configured -- resuming normal operations
[Mon Mar 04 19:23:01.413653 2019] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
很明显,apache或php有一个错误(两者都应该由nextcloud-app记录)。但我需要查看错误日志条目。我该怎么做呢?
发布于 2019-09-04 22:50:36
日志被重定向到nextcloud的data文件夹。
从您的nextcloud根目录开始,尝试使用:
$ tail nextcloud/data/nextcloud.log
(或您为数据存储设置的文件夹)。
发布于 2021-04-23 17:40:50
如果您使用此开关运行nextcloud以将其挂载到您主机上的文件夹中,那么更好的做法是通过设置run tail -f data/nextcloud.logs
、loglevel
来编辑config/config.php以获得更细粒度的日志
docker run -v ~/Projects/nextcloud:/var/www/html -d -p 8080:80 nextcloud
<?php
$CONFIG = array (
'htaccess.RewriteBase' => '/',
...
...
...
'loglevel' => 0,
);
通过运行docker restart YOUR_INSTNANCE_ID
重新启动docker镜像
然后是docker exec -it YOUR_INSTNANCE_ID bash -c "tail -f /var/www/html/data/nextcloud.log"
https://stackoverflow.com/questions/54989421
复制相似问题