自建的Wordpress的health check总是失败,显示以下错误:
/wp-json/wp/v2/types/post?context=edit
The REST API request failed due to an error.
Error: stream_socket_client(): SSL operation field with code 1. OpenSSL Error messages: error:0A000410:SSL routines::sslv3 alert handshake failure stream_socket_client: Failed to enable crypto stream_socket_client
解决办法:
- 安装php curl模块,例如
apt install php7.4-curl
- 重启apache2
systemctl restart apache2.service
本人走了一点弯路,通过apt安装wordpress的时候,php作为wordpress的依赖被自动安装,不过版本是8.3,然后就卸载了php8.3,安装了php7.4,发现site check还是不通过,最后安装了php7.4-curl才解决,没有试过在php8.3版本安装php8.3-curl是否可以解决问题。
Leave a Reply