I wrote a search app locally and everything is running fine. It's just an angular front end hitting the elasticsearch.
I installed elasticsearch on my digitalocean droplet running Ubuntu 14.04 apache. I have a domain for my app and I've already got one domain there. So I'm running multiple Virtual Hosts.
My service for my angular app is set to hit the elasticsearch cluster at: host: 'http://cvilleclinicaltrials.com:9200'
But my console says ERR_CONNECTION_REFUSED. I'm assuming that's because my .yml file is still set to accept localhost requests only. I changed that to accept from eth0 (which I'm fairly certain is a bad idea but I wanted to get this working) and then I get an error about CORS.
So at the end of the .yml file I added:
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: "X-Requested-With,X-Auth-Token,Content-Type, Content-Length"
But then when I restart elasticsearch service my log file shows the node stopping, stopped, closing, closed but it never restarts. If I comment out the above lines or remove them and restart the service it starts up fine.
So my question is, what is the correct way to set this up so my angular app will hit elasticsearch running on my domain on digitalocean?