# HTTP.jl connection refused

**URL:** https://discourse.julialang.org/t/http-jl-connection-refused/33142
**Category:** General Usage
**Tags:** package
**Created:** [January 9, 2020, 9:30am UTC](https://discourse.julialang.org/t/http-jl-connection-refused/33142 "2020-01-09T09:30:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Steven\_Sagaert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steven_sagaert/32/29578_2.png) [@Steven\_Sagaert](https://discourse.julialang.org/u/Steven_Sagaert)
#### Post date: [January 9, 2020, 9:30am UTC](https://discourse.julialang.org/t/http-jl-connection-refused/33142/1 "2020-01-09T09:30:35Z")

</div>

I used to have a webservice running on HttpServer and it just worked. Now I migrated that same server to HTTP.jl and when I try to connect to it via its dns name I get “connection refused” (either from a remote machine or even on the same machine via curl); Hower it works if I connect locally via curl on localhost!

At first I thought it was the CentOS firewall but that’s disabled so that’s not it.

Is this a HTTP.jl config issue?

---

<div class="post-metadata">

### Author: ![Steven\_Sagaert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steven_sagaert/32/29578_2.png) [@Steven\_Sagaert](https://discourse.julialang.org/u/Steven_Sagaert)
#### Post date: [January 9, 2020, 10:48am UTC](https://discourse.julialang.org/t/http-jl-connection-refused/33142/2 "2020-01-09T10:48:17Z")

</div>

I figured it out: I was using Sockets.localhost in the serve call (took that code from the HTTP documentation). I replaced it with “0.0.0.0” and now it works.
