Forum Discussion
GET Request using Host Header Value not IP Address
Hello Forum...
I am using a server pool to load balance some web servers for multiple applications. I have everything all set up and working in terms of accessing the web server, but I am hit with an issue that I assume should be easy to resolve, but I just can't seem to put my finger on it.
The web servers are sharepoint servers which use the host-header value to send the request to the correct sharepoint app using Alternate Access Mappings (AAM) in sharepoint.
Using the the server pool, the nodes are all configured with IP addresses and the get request is completed using the IP address rather than a specific host name..
Can anyone please point me in the right direction as to how I get the request to be done with the host header rather than the IP address of the selected node in the pool.
Many thanks!
(Our environment is 11.3.0)
11 Replies
- What_Lies_Bene1
Cirrostratus
Have you actually performed a packet capture and confirmed the IP is being used? LTM would not modify the headers unless you had an iRule configured and assigned to the VS to do so. - uni
Altocumulus
Are you saying that the servers receive the requests with an IP address in the Host header? - Kevin_Stewart
Employee
As Steve said, unless you change it in an iRule, the Host header will be what the client requests in their browser. If the client attempts to access with an IP, that'll be the Host header value. In any case, for the purposes of SharePoint Alternate Access Mapping, you can change the Host header in the HTTP_REQUEST event:when HTTP_REQUEST { HTTP::header replace Host "myspserver1.mydomain.com" }
- nash_65851
Nimbostratus
Thanks for the responses guys.. I stand corrected, I did the foolish thing and assumed that it was sending the request with the IP address in the host header (I assumed this due to the fact that I configured the pools with an IP address - Stupid, I know)... I did a packet capture and indeed the request is sent with the what the client requests in the browser. - Lee_A__Goergen_
Nimbostratus
Can you elaborate on how you set up your aams and any dns entries to make all this work. I am struggling to set up the same kind of thing. ==Lee
- Kevin_Stewart
Employee
The beauty of the above iRule is that you may not have to modify AAM at all. By default SharePoint should set an AAM entry for the local machine's server name. Without making any modifications, client requests coming from the Internet that send a Host header that doesn't match this value will get redirected to this value (and subsequently break). So you could either modify AAM on each SharePoint server to match the external name of the application, or use an iRule on the F5 to change the Host header to what the SharePoint server expects.
- Lee_A__Goergen_
Nimbostratus
OK, slight variation
I have my F5 pool set up - it points to my 2 wfes and appears healthy I am accessing the network via a VPN using the same F5 server that my pool is running on.
In DNS, I have my sharepoint host header(xxxportal) pointing to the F5 virtual IP for the sharepoint pool. xxx.xx.xx.110
New question, what do I have to put in my local host file. I can access the site if I use the IP of either sharepoint front end in my host file.
If I use the address of the virtual server, .110, it does not work.
What else might I need in my F5 configuration.
Thanks for listening and patience. ==Lee
- Kevin_Stewart
Employee
I can access the site if I use the IP of either sharepoint front end in my host file.
Does this mean you're going around the F5? If so, whatever you have in SharePoint's AAM configuration is what you need in the Host header. The easiest thing would probably be to add the external name to AAM, but in lieu of that, the above iRule needs to replace the host header with a name that the SharePoint server likes. If you have multiple SharePoint servers with their own AAM settings, then you'd also need a way to switch these values in the iRule based on the load balanced server IP.
- Lee_A__Goergen_
Nimbostratus
To be more specific, here is generally what I have done. SharePoint Web Application host header: xxxportal Web Application URL: http://xxxportal AAM: Public: http://xxxportal Internal http://xxxportal
DNS entry xxxportal.rest of fqdn pointing to xxx.xx.xx.110 (Virtual IP of the pool)
I know this is one of those foot bone connected to ankle bone, ankle bone connected to leg bone, leg bone ..... and I am just missing a piece or two.
I have not added any Alternate access mappings to this point. Should I have?
Thanks for listening. ==Lee
I am accessing this all through a VPN that uses an F5 webtop. That is why I put an entry into my local host file in the first place. The local entry is xxxportal and I have tried pointing it to .110 but that does not work.
Thanks for your patience and any help. ==Lee
- Kevin_Stewart
Employee
The goal of all of this is to get a Host header to SharePoint that it will accept, per its AAM settings. If the browser makes a request to https://sp.example.com, that Host header will pass through the proxy/load balancer and arrive at the SharePoint server. If SharePoint doesn't have an AAM entry for https://sp.example.com in the zone that it thinks the traffic is coming from, then it will redirect the client to the URL that is in AAM. So considering the that SharePoint has an internal name, and you have an external name that you want to use to access SharePoint, you have basically two options:
-
Add the external URL to the Internet zone in AAM
-
Rewrite the Host header to the internal name as it passes through the proxy
-
Recent Discussions
Related Content
* 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