# Julia HTTP server behind a reverse proxy

**URL:** <https://discourse.julialang.org/t/julia-http-server-behind-a-reverse-proxy/36456>\
**Category:** Web Stack\
**Tags:** reverse-proxy\
**Created:** [March 24, 2020, 6:00pm UTC](https://discourse.julialang.org/t/julia-http-server-behind-a-reverse-proxy/36456 "2020-03-24T18:00:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tencnivel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tencnivel/32/8662_2.png) [@tencnivel](https://discourse.julialang.org/u/tencnivel)\
**Post date:** [March 24, 2020, 6:00pm UTC](https://discourse.julialang.org/t/julia-http-server-behind-a-reverse-proxy/36456/1 "2020-03-24T18:00:07Z")

</div>

I am sharing a workaround solution to this error when calling a Julia HTTP server behind HAProxy:

```julia
Error: (Base.IOError("read: connection reset by peer (ECONNRESET)", -104)

```

If you google it you’ll find other applications than Julia that have the same problem and people advice to try to change the default `option http-keep-alive` to `option http-server-close` or `option httpclose` or to play with the different timeout values.

In my case nothing worked so I tried to use another reverse proxy (with load balancing).  
There are a few open-source options (eg. [https://www.cyberciti.biz/open-source/http-web-performance-proxy-load-balancer-accelerator-software/](https://www.cyberciti.biz/open-source/http-web-performance-proxy-load-balancer-accelerator-software/)). I gave a try to [Pound](https://www.apsis.ch/pound.html) and it solved my problem 🙂

The project is still active but there is a lack of packaging for the distros I am using (Fedora, Debian).

For Fedora, as of today, you need to install an additional repo as explained [here](https://copr.fedorainfracloud.org/coprs/brandfbb/Pound-2.8-patrodyne/)

For Debian, as of today, ‘buster’ does not have a package for Pound, you need to enable the repository of ‘stretch’ to have it available. Also, on Debian, do not forget to set `startup=1` in `/etc/default/pound` I lost a lot of time trying to figure out why the changes in pound.cfg were not taken into account.

Hope this will help others
