# Error HTTP 503 with Nginx Reverse Proxy

**URL:** <https://support.openanalytics.eu/t/error-http-503-with-nginx-reverse-proxy/1973>\
**Category:** ShinyProxy\
**Created:** [June 9, 2021, 1:09pm UTC](https://support.openanalytics.eu/t/error-http-503-with-nginx-reverse-proxy/1973 "2021-06-09T13:09:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahorn](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/ahorn/32/630_2.png) [@ahorn](https://support.openanalytics.eu/u/ahorn)\
**Post date:** [June 9, 2021, 1:09pm UTC](https://support.openanalytics.eu/t/error-http-503-with-nginx-reverse-proxy/1973/1 "2021-06-09T13:09:17Z")

</div>

Hello,  
we have a Shiny Dashboard with ShinyProxy behind a Nginx Reverse Proxy and receive HTTP error 503 from time to time randomly on different assets (css or js). We tried with versions of ShinyProxy from 2.3 up to 2.5. We have no load balancer, and also disabling logging as mentioned in a similar issue didn’t help.

**application.yml**

```
proxy:
  title: Shiny-Dashboard
  logo-url: /Logo_BW.png
  landing-page: /
  hide-navbar: true
  heartbeat-rate: 10000
  heartbeat-timeout: 900000
  port: 8080
  authentication: simple
  admin-groups: dev
  container-log-path: /home/shinyproxy/logs/container-logs

  users:
  - name: achim
    password: zyx
    groups: dev

  docker:
    cert-path: /home/none
    url: http://localhost:2375
    port-range-start: 20000

  specs:
  - id: headers
    display-name: HEADER Dev
    description: HEADER Development Version
    container-cmd: ["R", "-e", "HEADERDashboard::launchHEADERDashboard(log_level = 'debug')"]
    container-image: header-dashboard
    container-volumes: ["/etc/shinyproxy/config/config.yml:/config.yml", "/etc/shinyproxy/config/role_config.yml:/role_config.yml"]
    container-env:
      CONFIG_PATH: /
    access-groups: [dev]

logging:
  file:
    name: /home/shinyproxy/logs/shinyproxy.log

server:
  contextPath: /headers
  servlet:
     context-path: /headers

```

**nginx configuration**

```
location /headers {
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection "upgrade";
           proxy_read_timeout 600s;
           proxy_redirect off; 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;
}

```

Any help is welcome.  
Best,  
Achim

---

<div class="post-metadata">

**Author:** ![tdekoninck](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/tdekoninck/32/1079_2.png) [@tdekoninck](https://support.openanalytics.eu/u/tdekoninck)\
**Post date:** [June 16, 2021, 11:40am UTC](https://support.openanalytics.eu/t/error-http-503-with-nginx-reverse-proxy/1973/2 "2021-06-16T11:40:47Z")

</div>

Hi

We recently have experienced similar issues and we think we found the root cause. You can find all information related to this issue here: [https://shinyproxy.io/faq/#the-assets-of-my-shiny-app-sometimes-fail-to-load-http-error-503](https://shinyproxy.io/faq/#the-assets-of-my-shiny-app-sometimes-fail-to-load-http-error-503)

Could you be so kind to report back whether this solves the issue? Let me know if you need more information to implement the solution (so that I can update the FAQ).

---

<div class="post-metadata">

**Author:** ![ahorn](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/ahorn/32/630_2.png) [@ahorn](https://support.openanalytics.eu/u/ahorn)\
**Post date:** [June 25, 2021, 6:31am UTC](https://support.openanalytics.eu/t/error-http-503-with-nginx-reverse-proxy/1973/3 "2021-06-25T06:31:46Z")

</div>

Hi,  
and thanks a lot for this solution.After some tests it seems to me, that this really solved the issue.

Best,  
Achim
