Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4849

New Install 503 unavailable

$
0
0

First time install of haproxy 1.8.23-3 on a centos 8.2 box

I have found many examples for configuration files, varying slightly but am getting a service unavailable 503 when i try to access the shared ip

I will eventually have 2 haproxy and 2 web servers (port 80) but am trying to get just one working now.

Below is my configuration

#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
    log         127.0.0.1 local2     #Log configuration

    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     4000
    user        haproxy             #Haproxy running under user and group "haproxy"
    group       haproxy
    daemon

    # turn on stats unix socket
    stats socket /var/lib/haproxy/stats

#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
    mode                    http
    log                     global
    option                  httplog
    option                  dontlognull
    option http-server-close
    option forwardfor       except 127.0.0.0/8
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout server          1m
    timeout http-keep-alive 10s
    timeout check           10s
    maxconn                 3000

#---------------------------------------------------------------------
#HAProxy Monitoring Config
#---------------------------------------------------------------------
#bind haproxy3-monitoring *:8080                #Haproxy Monitoring run on port 8080
#    mode http
#    option forwardfor
#    option httpclose
#    stats enable
#    stats show-legends
#    stats refresh 5s
#    stats uri /stats                             #URL for HAProxy monitoring
#    stats realm Haproxy\ Statistics
#    stats auth howtoforge:howtoforge            #User and Password for login to the monitoring dashboard
#    stats admin if TRUE
#    default_backend app-main                    #This is optionally for monitoring backend

#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
    log         127.0.0.1 local2     #Log configuration

    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     4000
    user        haproxy             #Haproxy running under user and group "haproxy"
    group       haproxy
    daemon

    # turn on stats unix socket
    stats socket /var/lib/haproxy/stats

#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
    mode                    http
    log                     global
    option                  httplog
    option                  dontlognull
    option http-server-close
    option forwardfor       except 127.0.0.0/8
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout server          1m
    timeout http-keep-alive 10s
    timeout check           10s
    maxconn                 3000

#---------------------------------------------------------------------
#HAProxy Monitoring Config
#---------------------------------------------------------------------
#bind haproxy3-monitoring *:8080                #Haproxy Monitoring run on port 8080
#    mode http
#    option forwardfor
#    option httpclose
#    stats enable
#    stats show-legends
#    stats refresh 5s
#    stats uri /stats                             #URL for HAProxy monitoring
#    stats realm Haproxy\ Statistics
#    stats auth howtoforge:howtoforge            #User and Password for login to the monitoring dashboard
#    stats admin if TRUE
#    default_backend app-main                    #This is optionally for monitoring backend


#---------------------------------------------------------------------
# FrontEnd Configuration
#---------------------------------------------------------------------
frontend main
    bind *:80
    option http-server-close
    option forwardfor
    default_backend app-main

#---------------------------------------------------------------------
# BackEnd roundrobin as balance algorithm
#---------------------------------------------------------------------
backend app-main
    balance roundrobin                                     #Balance algorithm
    server webtest1 10.60.4.40:80 #check                 #Nginx1
    server webtest2 10.60.4.41:80 #check                 #Nginx2

Shared ip is 10.60.4.50 and when i try to go to that ip i see the error message.

Any help is appreciated

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>