【发布时间】:2018-04-28 09:12:45
【问题描述】:
我正在使用 Wordpress (4.8.1) 开发一个新网站。我已经安装了 WP RSS Aggregator 插件 (4.11.2) 以从 Joomla (2.5.17) 上先前存在的网站获取 RSS 提要。 Wordpress 安装在 GNU/Linux Debian Stretch (9.1) 操作系统上,由 Apache (2.4.25) 服务器在 https 中提供服务。 Joomla 在 Squeeze (6.0.10) 和 Apache (2.2.16) 上;该网站在 https 中提供,但它似乎不适用于 RSS 提要(URL 在 https 中,但浏览器告诉连接不安全)。 这是 Apache 配置的 sn-p:
<VirtualHost *:80>
ServerName intranet.cdg44.fr
ServerAlias i2.cdg44.fr
Redirect permanent / https://intranet.cdg44.fr/
</VirtualHost>
<VirtualHost *:443>
ServerName intranet.cdg44.fr
SSLEngine On
SSLCertificateFile /etc/ssl/certs/cdg44.pem
SSLCertificateKeyFile /etc/ssl/private/ca.key
<Directory />
Options FollowSymLinks
AllowOverride None
AuthType Kerberos
AuthName "Kerberos Login"
KrbMethodNegotiate On
KrbMethodK5Passwd On
KrbAuthRealms CDG44.FR
Krb5KeyTab /etc/krb5.keytab
require valid-user
</Directory>
</VirtualHost>
(对于这两个网站,我使用 Negociate 身份验证)。
Th WP RSS Aggregator 插件告诉我:
Failed to fetch the RSS feed. Error: cURL error 60: SSL certificate problem: unable to get local issuer certificate
我可以做些什么来解决我的问题?
编辑:
尝试以编程方式获取 RSS 提要:
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
file_get_contents("https://address.website.com/index.php?option=com_content&view=category&id=27&Itemid=241&format=feed&type=rss");
给出这个错误(通过 xdebug):
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /home/pyledevehat/workspace/intranet/wp-content/themes/themename/functions.php on line 197
我的 php.ini 配置良好:
allow_url_fopen = On
【问题讨论】:
标签: php wordpress apache joomla rss