Настройка поиска в приложении ElasticSearch Enterprise Search с использованием Apache и Cloudflare SSL

Я пытаюсь настроить корпоративный поиск на Ubuntu 18.04 с Apache2, домен проксируется с помощью cloudflare, как и сертификация SSL.

Я использую сертификат PEM.

Я попытался указать поиску предприятия использовать этот сертификат с использованием этих конфигураций.

    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.

И для большего контекста, когда я установлю ссылку, она будет работать, но я не могу войти в систему, поэтому веб-сайт отправляет вызовы API через HTTP, а не через HTTPS.

0 ответов

Другие вопросы по тегам