我在RHEL8上安装了Matomo4.7.1,并在运行核心存档时收到一条错误消息。
/opt/matomo/matomo-4.7.1/plugins/GeoIp2/GeoIP2AutoUpdater.php(175): GeoIP2AutoUpdater: failed to download 'https://download.db-ip.com/free/dbip-city-lite-2022-03.mmdb.gz' to '/opt/matomo/matomo-4.7.1/tmp/latest/DBIP-City.mmdb.gz.download': curl_exec: SSL certificate problem: unable to get local issuer certificate. Hostname requested was: download.db-ip.com [Query: , CLI mode: 1]
我们公司使用的是自签名证书,它安装在这台服务器上,Apache和PHP都按预期工作。我可以使用命令行curl下载错误消息中给出的文件,没有任何问题,但是运行核心存档总是显示错误。我还添加了接受无效ssl证书的选项,这并没有帮助。
php /opt/matomo/matomo/console core:archive --url=https://myserver.com/matomo/ --accept-invalid-ssl-certificate
我还用pem文件的路径更新了php.ini文件,但没有工作。
curl.cainfo = "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem"
还有什么是我遗漏的或者可以检查的吗?
发布于 2022-03-28 14:03:02
原来,Matomo有配置项,您可以将其设置为使用自定义pem文件,而不是Matomo中包含的配置项。
To solve this issue, you are able to provide your own cacert file that trusts your proxies certificate. To use your own file, follow these steps:
1. Upload your cacert.pem file in a folder on your server such as /path/to/your/cacert.pem
2. Add custom_cacert_pem = "/path/to/your/cacert.pem" to the [General] section of your config file config/config.ini.php.
3. Make sure the certification is readable by your webserver.
https://stackoverflow.com/questions/71620952
复制相似问题