问题描述: 在安装了Let's Encrypt SSL证书后,Flarum连接超时。
解决方法:
示例代码:
// config.php
return [
'url' => 'https://your-domain.com',
// ...
'paths' => [
'api' => 'api',
'admin' => 'admin',
],
// ...
'ssl' => [
'enabled' => true,
'strict' => true,
],
// ...
];
确保url
设置为使用HTTPS的域名,并且ssl
部分的enabled
值为true
。
示例代码:
// config.php
return [
// ...
'ssl' => [
'certificate_file' => '/etc/letsencrypt/live/your-domain.com/fullchain.pem',
'private_key_file' => '/etc/letsencrypt/live/your-domain.com/privkey.pem',
'certificate_chain_file' => '/etc/letsencrypt/live/your-domain.com/chain.pem',
],
// ...
];
确保certificate_file
、private_key_file
和certificate_chain_file
的值正确指向Let's Encrypt SSL证书的文件路径。
以上是一种可能的解决方法,具体解决方法可能因服务器环境和配置而异。如果问题仍然存在,建议查看服务器日志以获取更多信息,并在Flarum的支持论坛上寻求帮助。