Below is my haproxy config, I have 1 server and 1 backend for testing
This is a Wt wthttpd app, with no Apache loaded,
Problem I have is that the path to the app seems to change when running from
port 80 or haproxy,
meaning I lost all my style sheets and resources, not sure what the path is at
this point.
if I pull the site up with the port address mad-news.net:8060/ww/en/, the path
is fine,
Also it crashes after running a while,
I have monit loaded, so eventually (minute or two) it will restart,
not sure how to troubleshoot that failure, the app runs for weeks with no
problems by itself.
Current url is mad-news.net/ww/en.
Also, does haproxy stats require Apache or web server to run?
Thanks for any help.
#
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
user haproxy
group haproxy
daemon
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 1000
#contimeout 5000 # haproxy 1.4
timeout connect 5000
#clitimeout 50000 # haproxy 1.4
timeout client 50000
#srvtimeout 50000 # haproxy 1.4
timeout server 50000
#option httpclose
#option http-server-close # HTTP keepalive without killing Apache
#option http-pretend-keepalive
#option forwardfor
#option originalto
frontend wt
bind 216.224.185.71:80
# bind 108.59.251.28:80
# bind 0.0.0.0:80
# option http-server-close # HTTP keepalive without killing Apache
#
acl has_ww_uri path_beg -i /ww
reqirep ^([^\ :]*)\ /(.*) \1\ /ww/\2 if !has_ww_uri
#
redirect prefix http://mad-news.net code 301 if { hdr(host) -i
www.mad-news.net }
redirect prefix http://wittywizard.org code 301 if { hdr(host) -i
www.wittywizard.org }
redirect prefix http://lightwizzard.com code 301 if { hdr(host) -i
www.lightwizzard.com }
redirect prefix http://vetshelpcenter.com code 301 if { hdr(host) -i
www.vetshelpcenter.com }
# Note: see wthttpd.sh session-id-prefix
acl srv1 url_sub wtd=wt-8060
acl srv1_up nbsrv(bck1) gt 0
use_backend bck1 if srv1_up srv1
default_backend bck_lb
backend bck_lb
balance roundrobin
server srv1 216.224.185.71:8060 track bck1/srv1
# server srv2 108.59.251.28:8061 track bck2/srv2
backend bck1
balance roundrobin
server srv1 216.224.185.71:8060 check
#server srv2 108.59.251.28:8060 check