Reputation: 56
Hi i have this problem:
I need to redirect my backend server, using a particular context after ip and port definition…
Follow my example.
frontend my-https
bind *:443 ssl crt /mypath/haproxy/mycer.pem log-format “%ci:%cp [%t] %ft %b/%s %Tw/%Tc/%Tt %B %ts %ac/%fc/%bc/%sc/%rc %sq/%bq %[var(xxxxxxxxxxxx)]”
use_backend bk_1 if { path_beg /pippo }
backend bk_1 balance roundrobin server s1 xxx.xxx.xxx.xxx:3101/services ssl ca-file /etc/haproxy/cer.pem check weight 99 server s2 xxx.xxx.xxx.xxy:3101/services ssl ca-file /etc/haproxy/cer.pem check weight 01
My backend has a differente path, how can i solve it?
Thanks
Upvotes: 1
Views: 450
Reputation: 56
Solved,
just insert follow lines in backend configuration section:
mode http
http-request set-path /path/subpath/and_so_on
Upvotes: 1