# Apache reverse proxy 503 error

**URL:** <https://vaultwarden.discourse.group/t/apache-reverse-proxy-503-error/517>\
**Category:** Help\
**Created:** [January 13, 2021, 8:50pm UTC](https://vaultwarden.discourse.group/t/apache-reverse-proxy-503-error/517 "2021-01-13T20:50:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoof](https://avatars.discourse-cdn.com/v4/letter/z/e56c9b/32.png) [@zoof](https://vaultwarden.discourse.group/u/zoof)\
**Post date:** [January 13, 2021, 8:50pm UTC](https://vaultwarden.discourse.group/t/apache-reverse-proxy-503-error/517/1 "2021-01-13T20:50:57Z")

</div>

Any ideas for what I’m doing wrong? I can get to [http://bw.example.com:5080](http://bw.example.com:5080) but [https://bw.example.com](https://bw.example.com) fails with a 503 error. Thanks in advance!

My `docker-compose` file is:

```auto
# docker-compose.yml
version: '3'

services:
  bitwarden:
    image: bitwardenrs/server
    container_name: bitwardenrs-server
    ports:
      - "3012:3012"
      - "5080:80"
    network_mode: bridge
    restart: always
    volumes:
      - ./bw-data:/data
    environment:
      WEBSOCKET_ENABLED: 'true' # Required to use websockets
      SIGNUPS_ALLOWED: 'false' # set to false to disable signups
      ADMIN_TOKEN: 'secret'
      DOMAIN: 'http://bw.example.com'

```

and my Apache configuration is:

```auto
<VirtualHost *:443>
    SSLEngine on
    ServerName bw.example.com

    SSLCertificateFile /etc/letsencrypt/live/bw.example.com/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/bw.example.com/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/bw.example.com/chain.pem

    #ErrorLog /var/log/httpd/bitwarden-error.log
    #CustomLog /var/log/httpd/bitwarden-access.log combined

    RewriteEngine On
    RewriteCond %{HTTP:Upgrade} =websocket [NC]
    RewriteRule /notifications/hub(.*) ws://127.0.0.1:3012/$1 [P,L]
    ProxyPass / http://127.0.0.1:5080/

    ProxyPreserveHost On
    ProxyRequests Off
    RequestHeader set X-Real-IP %{REMOTE_ADDR}s
</VirtualHost>

```

---

<div class="post-metadata">

**Author:** ![WpJ](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@WpJ](https://vaultwarden.discourse.group/u/WpJ)\
**Post date:** [January 15, 2021, 9:28am UTC](https://vaultwarden.discourse.group/t/apache-reverse-proxy-503-error/517/2 "2021-01-15T09:28:51Z")

</div>

Do you have any logs on the Bitwarden side (from within the container (`docker logs bw`)?

`5xx` usually means there is a problem upstream.

---

<div class="post-metadata">

**Author:** ![zoof](https://avatars.discourse-cdn.com/v4/letter/z/e56c9b/32.png) [@zoof](https://vaultwarden.discourse.group/u/zoof)\
**Post date:** [January 15, 2021, 1:49pm UTC](https://vaultwarden.discourse.group/t/apache-reverse-proxy-503-error/517/3 "2021-01-15T13:49:15Z")

</div>

Yes, here it is.

```auto
[INFO] No .env file found.

[WARNING] The following environment variables are being overriden by the config file,
[WARNING] please use the admin panel to make changes to them:
[WARNING] DOMAIN, SIGNUPS_ALLOWED, ADMIN_TOKEN, SMTP_HOST, SMTP_PORT, SMTP_FROM, SMTP_FROM_NAME, SMTP_USERNAME, SMTP_PASSWORD

[2021-01-15 02:30:51.231][start][INFO] Rocket has launched from http://0.0.0.0:80
[2021-01-15 02:30:51.232][parity_ws][INFO] Listening for new connections on 0.0.0.0:3012.
[2021-01-15 02:30:54.461][request][INFO] GET /admin
[2021-01-15 02:30:54.462][response][INFO] GET /admin [2] (admin_login) => 200 OK

```

The latter two lines come from accessing the admin page with http at port 5080.

---

<div class="post-metadata">

**Author:** ![zoof](https://avatars.discourse-cdn.com/v4/letter/z/e56c9b/32.png) [@zoof](https://vaultwarden.discourse.group/u/zoof)\
**Post date:** [January 17, 2021, 3:16am UTC](https://vaultwarden.discourse.group/t/apache-reverse-proxy-503-error/517/4 "2021-01-17T03:16:41Z")

</div>

There was an Apache configuration error of some sort although I can’t figure it out. I installed on my usual VPS and it worked fine…

---

<div class="post-metadata">

**Author:** ![Antergosgeek](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@Antergosgeek](https://vaultwarden.discourse.group/u/Antergosgeek)\
**Post date:** [January 17, 2021, 2:57pm UTC](https://vaultwarden.discourse.group/t/apache-reverse-proxy-503-error/517/5 "2021-01-17T14:57:53Z")

</div>

What about copying the functioning config from the usual VPS and use that as a basis for adjustments?

---

<div class="post-metadata">

**Author:** ![zoof](https://avatars.discourse-cdn.com/v4/letter/z/e56c9b/32.png) [@zoof](https://vaultwarden.discourse.group/u/zoof)\
**Post date:** [January 17, 2021, 3:26pm UTC](https://vaultwarden.discourse.group/t/apache-reverse-proxy-503-error/517/6 "2021-01-17T15:26:09Z")

</div>

My usual VPS was actually my intended eventual target! I have 2 months free from Digital Ocean through Destination Linux and wanted to get it working there first.

---

<div class="post-metadata">

**Author:** ![BowenMarmot](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@BowenMarmot](https://vaultwarden.discourse.group/u/BowenMarmot)\
**Post date:** [January 23, 2021, 4:43am UTC](https://vaultwarden.discourse.group/t/apache-reverse-proxy-503-error/517/7 "2021-01-23T04:43:34Z")

</div>

My apache config looks pretty much the same as yours with the exception that you are missing the ProxyPassReverse line. Mine is right below the ProxyPass line as below:

ProxyPass / [http://127.0.0.1:5080/](http://127.0.0.1:5080/)  
ProxyPassReverse / [http://127.0.0.1:5080/](http://127.0.0.1:5080/)
