Routing by string, it works for other strings


#1

Hello community,

i am a nooby with haproxy but until jet i can work with it.

I try to route requests with ftp. or sftp over port 5022 to one webserver.
So i configure:
frontend sftp_frontend
bind *:5022
mode tcp
default_backend httpserver

#ftp routing
acl sftp_in_uri path_beg sftp. ftp. 
use_backend sftp_back if sftp_in_uri

backend sftp_back
server web01 192.168.2.50:5022 check

So i think all requests over port 5022 will be checked. If i enable that. It refused all requests to the webserver and i cant access my websites (Error Connection refused).

For my typo3 configuration it works;
frontend https_frontend
bind *:443
mode tcp
option httpclose
option forwardfor
reqadd X-Forwarded-Proto:\ https
default_backend httpserver

#layer7_for_typo3_ssl
acl url_typo3 path_beg /typo3
use_backend typo3_back_ssl if url_typo3

backend typo3_back_ssl
server webserver01-ssl 192.168.122:443 check
server webserver11-ssl 192.168.123:443 check

Have someone an idea why the routing is stopped if i enable the ftp and sftp configuration an maybe why it doesnt work?

All requests with (http:// / https://) ftp.xxxx.com or sftp.xxxxx.com should be routed.

cheers HiTTi


#2

Only thing that jumped out was I think you are trying to use an ACL with path_beg in TCP mode which I don’t think would work unless you switch to HTTP mode.