Closed medmek closed 2 months ago
Maybe we misleading the information here. Have you setup proxy pass to port 9200 ? This is important part
In my /etc/apache2/sites-enabled/000-default.conf
I added this :
Listen 8080
<VirtualHost *:80>
...
</VirtualHost>
<VirtualHost *:8080>
ProxyPass "/" "http://localhost:9200/"
ProxyPassReverse "/" "http://localhost:9200/"
</VirtualHost>
but I think I removed it following this step :
Step 2: Secure communication with Apache ... 2 - If you added the preceding to your secure virtual host, remove Listen 8080 and the <VirtualHost *:8080> directives you added earlier to your unsecure virtual host.
when I added it back it works 👍
but it's as if my secure conf /etc/apache2/sites-enabled/000-default-le-ssl.conf
isn't sufficient :
<IfModule mod_ssl.c>
<VirtualHost *:443>
# ...
</VirtualHost>
<VirtualHost *:443>
# ...
</VirtualHost>
<Proxy *>
Order deny,allow
Allow from all
AuthType Basic
AuthName "Elastic Server"
AuthBasicProvider file
AuthUserFile /usr/local/apache/password/.htpasswd_elasticsearch
Require valid-user
# This allows OPTIONS-requests without authorization
<LimitExcept OPTIONS>
Require valid-user
</LimitExcept>
</Proxy>
</IfModule>
General issue
Description:
I was confused in regard to port used by elasticsearch (:9200) and the port used by the proxy (:8080)
Possible solutions:
in this example it would be maybe better to specify 9200 as the by default port to use for elasticsearch
Additional information:
In my case when I used 8080 after removing the directives from the unsecure virtual host :