You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the docker-compose.yamlimage: section needs to correspond to a valid image from Docker Hub.
should be
image: daro1337/bilziv-www:latest
haproxy.cfg
global and defaults cannot be left empty. HAProxy will not load due to missing timeouts. See example Error Log below
dariusz-adamczyk-haproxy-1 | [NOTICE] (1) : haproxy version is 2.6.2-16a3646
dariusz-adamczyk-haproxy-1 | [WARNING] (1) : config : missing timeouts for frontend 'web-front'.
dariusz-adamczyk-haproxy-1 | | While not properly invalid, you will certainly encounter various problems
dariusz-adamczyk-haproxy-1 | | with such a configuration. To fix this, please ensure that all following
dariusz-adamczyk-haproxy-1 | | timeouts are set to a non-zero value: 'client', 'connect', 'server'.
dariusz-adamczyk-haproxy-1 | [WARNING] (1) : config : missing timeouts for backend 'web-front'.
dariusz-adamczyk-haproxy-1 | | While not properly invalid, you will certainly encounter various problems
dariusz-adamczyk-haproxy-1 | | with such a configuration. To fix this, please ensure that all following
dariusz-adamczyk-haproxy-1 | | timeouts are set to a non-zero value: 'client', 'connect', 'server'.
dariusz-adamczyk-haproxy-1 | [ALERT] (1) : config : Proxy 'web-front': no SSL certificate specified for bind '*:443' at [/usr/local/etc/haproxy/haproxy.cfg:7] (use 'crt').
dariusz-adamczyk-haproxy-1 | [ALERT] (1) : config : Fatal errors found in configuration.
bind to port 80 is not necessary since docker-compose.yaml is configured to respond and direct traffic via 443 only.
After changing the haproxy.cfg to as on example below project will start.
global
stats socket /tmp/api.sock user haproxy group haproxy mode 660 level admin expose-fd listeners
log stdout format raw local0 info
defaults
mode http
timeout client 10s
timeout connect 5s
timeout server 10s
timeout http-request 10s
log global
frontend web-front
# bind *:80
bind :443 ssl crt /usr/local/etc/haproxy/ssl/ssl.pem
acl https ssl_fc
http-request set-header X-Forwarded-Proto http if !https
http-request set-header X-Forwarded-Proto https if https
mode http
default_backend web-front
backend web-front
mode http
balance roundrobin
server srv1 web1:80
server srv2 web2:80
Side note:
The creation of the SSL certificate could be a simple BASH script.
The text was updated successfully, but these errors were encountered:
In the
docker-compose.yaml
image:
section needs to correspond to a valid image from Docker Hub.should be
haproxy.cfg
global
anddefaults
cannot be left empty. HAProxy will not load due to missing timeouts. See example Error Log belowbind
to port80
is not necessary sincedocker-compose.yaml
is configured to respond and direct traffic via443
only.After changing the
haproxy.cfg
to as on example below project will start.Side note:
The creation of the
SSL
certificate could be a simpleBASH
script.The text was updated successfully, but these errors were encountered: