我试图在带有apache2的Ubuntu18.04上设置enterprise search,该域使用cloudflare代理,ssl认证也是如此。
我正在使用pem证书。
我已经尝试告诉Enterprise search使用这些配置来使用该证书
ent_search.ssl.enabled: true
ent_search.ssl.key: /etc/cloudflare/moncefjouets.com.key
ent_search.ssl.certificate: /etc/cloudflare/moncefjouets.com.pem
但整个企业搜索链接变得无法访问。
如果有人遇到这个问题,如果你能帮助我,我将不胜感激
有关更多上下文:
错误不在于企业搜索本身,而是我在执行curl时得到的输出:
curl localhost:9201
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.
当我将输出保存到一个文件中时,它显示以下内容
curl localhost:9201 --output /tmp/esout.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14 0 14 0 0 1555 0 --:--:-- --:--:-- --:--:-- 1750
这是文件的内容 ^U^C^C^@^B^BP
通过https
$ curl https://localhost:9201
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
下面是我的apache配置:
cat /etc/apache2/sites-available/es.moncefjouets.com.conf
<VirtualHost *:80>
ServerName es.moncefjouets.com
ProxyPreserveHost On
ProxyPass / http://localhost:9201/
ProxyPassReverse / http://localhost:9201/
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName es.moncefjouets.com
ServerAdmin webmaster@localhost
ProxyPreserveHost On
ProxyPass / http://localhost:9201/
ProxyPassReverse / http://localhost:9201/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/cloudflare/moncefjouets.com.pem
SSLCertificateKeyFile /etc/cloudflare/moncefjouets.com.key
</VirtualHost>
</IfModule>
当然,不用说,我已经将企业搜索的默认端口更改为9201。
为了获得更多的上下文,当我设置链接将工作,但我不能登录,因此该网站是通过http而不是https发送api调用。
暂无答案!
目前还没有任何答案,快来回答吧!