Apache vHost doesnt work behind HaProxy


#1

Hi all together,

i am using HaProxy as proxy for an apache2 webserver setup.
Apache2 is listening on port 8080 and HaProxy is listening on port 80 and 443. I am also using SSL.
If i browse phab.example.com:8080 (domain changed here) everything is working fine, vHosts works and so on.
But if i browse phab.example.com (which requests to HaProxy), i always get the content of /var/www/html and i dont know why.

My HaProxy configuration /etc/haproxy/haproxy.cfg:

Apache ports.conf:

vHost /etc/apache2/sites-enabled/35_froxlor_normal_vhost_phab.linetec-studio.com.conf:

Whats the problem?
Please help me. Thank you!

EDIT:
I have moved configuration files to github gist, so it is formatted better.


#2

I have also cheched the HTTP headers.

phab.example.com:8080 (working example):


#3

Sry for splitted posts - as a new user i cannot put 2 images or more than 2 links in one post.

phab.example.com (not working, over HaProxy):


#4

I have fixed the problem now!
Apache2 vHosts only listen on public server ip, not on internal 127.0.0.1 ip.
So i have to change backend line server phab1 127.0.0.1:8080 check to server phab1 193.30.xxx.xxx:8080 check.