# Help converting Nginx config to HAproxy for immich

**URL:** <https://discourse.haproxy.org/t/help-converting-nginx-config-to-haproxy-for-immich/9205>\
**Category:** Help!\
**Created:** [November 4, 2023, 9:26pm UTC](https://discourse.haproxy.org/t/help-converting-nginx-config-to-haproxy-for-immich/9205 "2023-11-04T21:26:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skink](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@skink](https://discourse.haproxy.org/u/skink)\
**Post date:** [November 4, 2023, 9:26pm UTC](https://discourse.haproxy.org/t/help-converting-nginx-config-to-haproxy-for-immich/9205/1 "2023-11-04T21:26:45Z")

</div>

Hi,

I’m trying to setup HAproxy for immich reverse proxy - [Reverse Proxy | Immich](https://immich.app/docs/administration/reverse-proxy). This is the Nginx config I need to recreate in HAproxy:  
server {  
server\_name

```
# https://github.com/immich-app/immich/blob/main/nginx/templates/default.conf.template#L28
client_max_body_size 50000M;

location / {
    proxy_pass http://<snip>:2283;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    # http://nginx.org/en/docs/http/websocket.html
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_redirect off;
}

```

}

Could someone please provide instruction how to configure this in HAproxy?

Thanks
