Skip to content

Instantly share code, notes, and snippets.

@vpack
Last active August 29, 2015 14:22
Show Gist options
  • Save vpack/c281cc350a82f60d740e to your computer and use it in GitHub Desktop.
Save vpack/c281cc350a82f60d740e to your computer and use it in GitHub Desktop.
Running Jenkins on port 80 (Using HAProxy)

###Install HAProxy

yum install haproxy

###Update Config file for frontend and backend.

  • No need to change 'global' and 'defaults' section.
  • Sample Config : /etc/haproxy/haproxy.cfg
#---------------------------------------------------------------------
# main frontend which proxys to the backends
#---------------------------------------------------------------------
frontend www
   bind *:80
   default_backend app
#---------------------------------------------------------------------
# round robin balancing between the various backends
#---------------------------------------------------------------------
backend app
    balance     roundrobin
    server  app1 127.0.0.1:8080 check

###Enable logging

Follow instructions from this blog :

vi /etc/haproxy/haproxy.cfg
vi /etc/rsyslog.conf 
echo "local2.*    /var/log/haproxy.log" >>  /etc/rsyslog.d/haproxy.conf
service rsyslog restart
service haproxy restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment