0
votes

My need is to enable ssl(https) in apache via load balancer.

The IT team will install ssl certificate in Cisco load balancer and control all traffic from the client. This load balancer will set the header value

X-Forwarded-Proto and X-Forwarded-For and forward it to apache web server. Note: port is always 80, protocol always http for the traffic b/w apache and load balancer.

Now the IT team said they have configured the Load balancer. but when i checking in php by putting

$headers["X-Forwarded-For"]

$headers["X-Forwarded-Proto"]

These lines not returning any !!! is there any configuration need to be done in apache webserver to receive the header values X-Forwarded-Proto and X-Forwarded-For. i have reconfirmed with IT team that they are setting the header values properly.

can any one help me in configuring this?

Thanks.

1
what is $headers? is it apache_request_headers()?regilero
yes regilero i tried $headers = apache_request_headers(); foreach ($headers as $header => $value) { echo "$header: $value "; } but that didnt list the X-Forwarded-For and X-Forwarded-Proto values so i have to get the value by explicitlyGnanz
ask the It-Team about any security module added in Apache that would prevent X-Forwarded-For and such to be filtered with withe-list proxy address (mod_rpaf, mod_remoteip), or for specific configuration of mod_security. This header can be spoofed and a lot of security tools could be involved in a filtering of the header before PHP comes in.regilero

1 Answers

0
votes

i couldn't able to do with $headers["X-Forwarded-For"]

$headers["X-Forwarded-Proto"] so i tried HTTP:X-Forwarded-Port its working in our site