Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Ha proxy redirects to wrong ip

    HA/CARP/VIPs
    1
    1
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Robban 0
      last edited by

      Hi,
      Trying to set up HA Proxy but my www adress is redirected to my forum adress on a different server.
      Here is my config!

      # Automaticaly generated, dont edit manually.
      # Generated on: 2022-06-15 01:30
      global
      	maxconn			2000
      	log			/var/run/log	local0	debug
      	stats socket /tmp/haproxy.socket level admin  expose-fd listeners
      	uid			80
      	gid			80
      	nbproc			1
      	nbthread			1
      	hard-stop-after		15m
      	chroot				/tmp/haproxy_chroot
      	daemon
      	tune.ssl.default-dh-param	2048
      	server-state-file /tmp/haproxy_server_state
      
      listen HAProxyLocalStats
      	bind 127.0.0.1:2200 name localstats
      	mode http
      	stats enable
      	stats admin if TRUE
      	stats show-legends
      	stats uri /haproxy/haproxy_stats.php?haproxystats=1
      	timeout client 5000
      	timeout connect 5000
      	timeout server 5000
      
      frontend example.nu
      	bind			111.111.51.16:443 name 111.111.51.16:443   ssl crt-list /var/etc/haproxy/example.nu.crt_list  
      	mode			http
      	log			global
      	option			http-keep-alive
      	option			forwardfor
      	acl https ssl_fc
      	http-request set-header		X-Forwarded-Proto http if !https
      	http-request set-header		X-Forwarded-Proto https if https
      	timeout client		30000
      	acl			forum.example.nu	var(txn.txnhost) -m str -i forum.example.nu
      	acl			www.example.nu	var(txn.txnhost) -m str -i www.example.nu
      	acl			aclcrt_example.nu	var(txn.txnhost) -m reg -i ^([^\.]*)\.example\.nu(:([0-9]){1,5})?$
      	acl			aclcrt_example.nu	var(txn.txnhost) -m reg -i ^example\.nu(:([0-9]){1,5})?$
      	http-request set-var(txn.txnhost) hdr(host)
      	use_backend example.nu_ipvANY  if  forum.example.nu aclcrt_example.nu
      	use_backend example.nu_ipvANY  if  www.example.nu aclcrt_example.nu
      	use_backend example.nu_ipvANY  if   aclcrt_example.nu
      
      backend example.nu_ipvANY
      	mode			http
      	id			100
      	log			global
      	timeout connect		30000
      	timeout server		30000
      	retries			3
      	server			forum.example.nu_https 192.168.1.20:443 id 102 ssl check-ssl  verify none crt /var/etc/haproxy/server_clientcert_61f54bc49f246.pem 
      	server			www.example.nu 192.168.1.19:443 id 105 ssl check-ssl  verify none crt /var/etc/haproxy/server_clientcert_61f54bc49f246.pem
      

      Really need some help!!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.