Set the agent

1. Enable the mod_proxy

sudo a2enmod proxy_http



Need to restart the Apache



2. Open with a text editor/etc/apache2/sites-available/000-default.conf

3. Add the following to the profile header:

Listen 8080

4. Add to the bottom of the configuration file

<VirtualHost *:8080>
    ProxyPass "/" "http://localhost:9200/"
    ProxyPassReverse "/" "http://localhost:9200/"
</VirtualHost>

5. You need to restart Apache

sudo systemctl restart apache2

6. Verify that the agent succeeded

curl -i http://localhost:8080/_cluster/health

Success if the display message is similar to the following

HTTP/1.1 200 OK Date: Tue, 23 Feb 2016 20:38:03 GMT Content-type: application/json; charset=UTF-8 Content-Length: 389 Connection: keep-alive {"cluster_name":"elasticsearch","status":"yellow","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active _primary_shards":5,"active_shards":5,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":5,"delayed_unassi gned_shards":0,"number_of_pending_tasks":0,"number_of_in_flight_fetch":0,"task_max_waiting_in_queue_millis":0,"active_sh Ards_percent_as_number ": 50.0}