# Connection refused & apache

**URL:** <https://discuss.elastic.co/t/connection-refused-apache/81557>\
**Category:** Elasticsearch\
**Created:** [April 7, 2017, 3:01am UTC](https://discuss.elastic.co/t/connection-refused-apache/81557 "2017-04-07T03:01:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikebrowntsbod](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@mikebrowntsbod](https://discuss.elastic.co/u/mikebrowntsbod)\
**Post date:** [April 7, 2017, 3:01am UTC](https://discuss.elastic.co/t/connection-refused-apache/81557/1 "2017-04-07T03:01:09Z")

</div>

I am getting the following error when i attempt to do the curl command to test

curl: (7) Failed to connect to localhost port 9200: Connection refused

I did not install ngix as I have apach2 installed

can i run everything and apache2 on the same server?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 10, 2017, 11:03am UTC](https://discuss.elastic.co/t/connection-refused-apache/81557/2 "2017-04-10T11:03:51Z")

</div>

Hey,

can you please invest some more time in writing up your question. This question is pretty unclear. I cannot extract the concrete problem here.

Is your problem, that you cannot connect to Elasticsearch under `localhost:9200`? If so, have you checked that the elasticsearch service is running using systemd or sysvinit? Is it even listening on that interface?

And how does nginx or apache come into play here from your point of view? You can run on the same server (another question is if you should).

Looking forward to help.

--Alex

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 8, 2017, 11:08am UTC](https://discuss.elastic.co/t/connection-refused-apache/81557/3 "2017-05-08T11:08:02Z")

</div>

Closed on May 8, 2017, 11:08am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
