# 503 Error and ssl error

**URL:** <https://discourse.haproxy.org/t/503-error-and-ssl-error/7399>\
**Category:** Help!\
**Created:** [February 14, 2022, 4:23pm UTC](https://discourse.haproxy.org/t/503-error-and-ssl-error/7399 "2022-02-14T16:23:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morta](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Morta](https://discourse.haproxy.org/u/Morta)\
**Post date:** [February 14, 2022, 4:23pm UTC](https://discourse.haproxy.org/t/503-error-and-ssl-error/7399/1 "2022-02-14T16:23:48Z")

</div>

Hi!

I have following configuration:  
NAS (192.168.1.118) → Apache → Nextcloud/DAV  
/  
ROUTER/Firewall/HAproxy (192.168.1.1)  
\  
Server (192.168.1.100) → Apache with severals vhost

I want to bring up one vhost as test with following configuration

```auto
<VirtualHost *:80>
     ServerAdmin mail@joelmueller.ch
     ServerName joelmueller.ch
     ServerAlias www.joelmueller.ch
     DocumentRoot /usr/share/webapps/blog/
     DirectoryIndex index.php
     RemoteIPProxyProtocol On
     <Directory /usr/share/webapps/blog>
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Order allow,deny
        allow from all

    <FilesMatch \.php$>
      # For Apache version 2.4.10 and above, use SetHandler to run PHP as a fastCGI process server
      SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://localhost"
    </FilesMatch>
    <Files "*.php">
      MultiviewsMatch Any
    </Files>
    </Directory>
     ErrorLog /var/log/httpd/blog_error.log
     CustomLog /var/log/httpd/blog_access.log combined
</VirtualHost>

```

My HAproxy.conf file looks like this

```auto
cat haproxy.conf
#
# Automatically generated configuration.
# Do not edit this file manually.
#

global
    uid 80
    gid 80
    chroot /var/haproxy
    daemon
    stats socket /var/run/haproxy.socket group proxy mode 775 level admin
    nbproc 1
    nbthread 4
    hard-stop-after 60s
    no strict-limits
    maxconn 10000
    tune.ssl.default-dh-param 4096
    spread-checks 2
    tune.bufsize 16384
    tune.lua.maxmem 0
    log /var/run/log local0 info
    lua-prepend-path /tmp/haproxy/lua/?.lua

defaults
    log global
    option redispatch -1
    maxconn 5000
    timeout client 30s
    timeout connect 30s
    timeout server 30s
    retries 3
    default-server init-addr last,libc
    default-server maxconn 5000

# autogenerated entries for ACLs

# autogenerated entries for config in backends/frontends

# autogenerated entries for stats

# Frontend: O_SNI_fronted (Listening 0.0.0.0:80 0.0.0.0:443)
frontend O_SNI_fronted
    bind 0.0.0.0:80 name 0.0.0.0:80 
    bind 0.0.0.0:443 name 0.0.0.0:443 
    mode tcp
    default_backend SSL_backend
    # tuning options
    timeout client 30s

    # logging options

# Frontend: 1_HTTP_frontend (Listening 127.0.0.1:80)
frontend 1_HTTP_frontend
    bind 127.0.0.1:80 name 127.0.0.1:80 accept-proxy 
    mode http
    option http-keep-alive
    option forwardfor
    # tuning options
    timeout client 30s

    # logging options
    # ACL: NO_SSL_Rule
    acl acl_620808a860e296.91534155 req.ssl_ver gt 0

    # ACTION: HTTP_TO_HTTPS_RULE
    http-request redirect scheme https code 301 if !acl_620808a860e296.91534155

# Frontend: 1_HTTPS_frontend (Listening 127.0.0.1:443)
frontend 1_HTTPS_frontend
    http-response set-header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
    bind 127.0.0.1:443 name 127.0.0.1:443 accept-proxy ssl curves secp384r1 no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256 ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 alpn h2,http/1.1 crt-list /tmp/haproxy/ssl/6208140971a7a3.08696099.certlist 
    mode http
    option http-keep-alive
    # tuning options
    timeout client 15m

    # logging options

    # ACTION: PUBLIC_MAP_RULE
    # NOTE: actions with no ACLs/conditions will always match
    use_backend %[req.hdr(host),lower,map_dom(/tmp/haproxy/mapfiles/620809e036a6d1.87483247.txt)] 

# Backend: SSL_backend (SSL backend)
backend SSL_backend
    # health checking is DISABLED
    mode tcp
    balance source
    # stickiness
    stick-table type ip size 50k expire 30m  
    stick on src
    # tuning options
    timeout connect 30s
    timeout server 30s
    server SSL_Server 127.0.0.1 send-proxy-v2 check-send-proxy

# Backend: 5erver_backend (Server backend)
backend 5erver_backend
    # health checking is DISABLED
    mode http
    balance source
    # stickiness
    stick-table type ip size 50k expire 30m  
    stick on src
    # tuning options
    timeout connect 30s
    timeout server 30s
    http-reuse safe
    server 5erver_Server_80 192.168.1.100:80 
# ERROR: server data not found (0b989d9b-eb50-4dff-8a2f-6bc56245fd74)

# Backend: NAS_backend (NAS backend)
backend NAS_backend
    # health checking is DISABLED
    mode http
    balance source
    # stickiness
    stick-table type ip size 50k expire 30m  
    stick on src
    # tuning options
    timeout connect 30s
    timeout server 30s
    http-reuse safe
    server nas_Server_80 192.168.1.118:80 
# ERROR: server data not found (36c63574-bd94-43f7-836e-cd78c8edc6c0)

```

My map files looks like this

```auto
#public subdomains mapping
flood 5erver_backend
frank 5erver_backend
www 5erver_backend
torrent 5erver_backend
grafana 5erver_backend
nas 5erver_backend
kvm 5erver_backend
monitoring 5erver_backend
speedtest 5erver_backend
sync 5erver_backend
tracker 5erver_backend
cloud NAS_backend
dav NAS_backend

```

How I can fix this error?

---

<div class="post-metadata">

**Author:** ![Morta](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Morta](https://discourse.haproxy.org/u/Morta)\
**Post date:** [February 14, 2022, 5:04pm UTC](https://discourse.haproxy.org/t/503-error-and-ssl-error/7399/2 "2022-02-14T17:04:03Z")

</div>

I cloud fix the error of ssl with adjust the chipher list and reset the cert.

Now I got a 503 error when I open the url www.joelmueller.ch

Can someone check my vhost?

I ha remote\_ip enabled as mod and added the proxy options who are told on the website of apache

What is the error?
