Forum Discussion
dacrud_18985
Nimbostratus
Jun 24, 2008preserve hostname
Hi all,
I need to preserve the hostname to a back end apache server so that when the request gets passed through, the apache server can still pick it up through a virtualhost name. Is there anyway to do this? Any help would be appreciated.
Thanks.
5 Replies
- The_Bhattman
Nimbostratus
You can preserve the hostname when by passing it to a variable or a global variable.
I think we will need more information, can you provide any code that you have developed so far?
thanks,
CB - dacrud_18985
Nimbostratus
Hi,
I don't think you need more information. Basically I'm trying to get Apache to recognize the hostname as it is passed through, as "ServerName" directive so that it can pick it up as a virtualhost. I just need to figure out how to pass the hostname through. - Deb_Allen_18Historic F5 AccountThe hostname requested by the client should already be passed in the Host header, and LTM will not modify or remove it unless explcitly configured to do so.
You can test what LTM sees with a simple iRule:when HTTP_REQUEST { log local0. "HTTP Host requested by [IP::client_addr]: [HTTP::host]" }
It will produce a log line in the LTM/Local Traffic log that looks like this for each request:HTTP Host requested by 192.168.1.12: www.domain.com
The hostname reflected there should be what Apache sees.
HTH
/deb - Deb_Allen_18Historic F5 AccountThe hostname reflected there should be what Apache sees.
You can verify what actually is sent to Apache by examining a packet trace on the link between the LTM and the servers.
/d - dacrud_18985
Nimbostratus
Thanks!
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
