Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/246.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress ElasticPress 401未授权数据索引_Php_Wordpress_Apache_Curl_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch - Fatal编程技术网 elasticsearch,Php,Wordpress,Apache,Curl,elasticsearch" /> elasticsearch,Php,Wordpress,Apache,Curl,elasticsearch" />

Php Wordpress ElasticPress 401未授权数据索引

Php Wordpress ElasticPress 401未授权数据索引,php,wordpress,apache,curl,elasticsearch,Php,Wordpress,Apache,Curl,elasticsearch,我一直在一个Wordpress网站上工作,该网站通过Elastic Press插件与Elastic搜索服务器进行通信,以索引和检索数据。EP使用WP-CLI与ES服务器进行通信 在当地,它工作得很好,而且从一开始就工作得很好。我今天将站点移动到了服务器,并且。。它不起作用。我试着看看发生了什么,在插件中,在连接到服务器时,我得到了以下信息: array(5) {["headers"]=> array(4) { ["cache-control"]=> string(8) "no-cac

我一直在一个Wordpress网站上工作,该网站通过Elastic Press插件与Elastic搜索服务器进行通信,以索引和检索数据。EP使用WP-CLI与ES服务器进行通信

在当地,它工作得很好,而且从一开始就工作得很好。我今天将站点移动到了服务器,并且。。它不起作用。我试着看看发生了什么,在插件中,在连接到服务器时,我得到了以下信息:

array(5) {["headers"]=> array(4) {
["cache-control"]=> string(8) "no-cache"
["connection"]=> string(5) "close"
["content-type"]=> string(9) "text/html"
["www-authenticate"]=> string(23) "Basic realm="basicauth""
}
["body"]=> string(112) "<html><body><h1>401 Unauthorized</h1>You need a valid user and password to access this content.</body></html>"
["response"]=> array(2) { ["code"]=> int(401), ["message"]=> string(12) "Unauthorized" } ["cookies"]=> array(0) {} ["filename"]=> NULL
}
array(5){[“headers”]=>array(4){
[“缓存控制”]=>字符串(8)“无缓存”
[“连接”]=>字符串(5)“关闭”
[“内容类型”]=>字符串(9)“文本/html”
[“www authenticate”]=>string(23)“Basic realm=“basicauth”
}
[“body”]=>string(112)“401未经授权您需要有效的用户和密码才能访问此内容。”
[“响应”]=>array(2){[“代码”]=>int(401),[“消息”]=>string(12)“未经授权”}[“cookies”]=>array(0){}[“文件名”]=>NULL
}
你应该在WP中使用的EP_主机的格式是这样的,所以它会发送用户名和密码

在这个url上使用wget或curl可以在SSH中正常工作,因此服务器与ES服务器进行通信

我想它可能来自Apache版本,但我不确定。 目前,服务器是一个带有Apache/2.4.7的Ubuntu操作系统

有什么想法吗?提前谢谢