Previous Topic: Update the DNS Tables with your Host-Header-Based Virtual HostsNext Topic: Add Public and Internal URLs on your SharePoint server for your Host-Header-Based Hosts


Create Proxy Rules for your Host-Header-Based Virtual Hosts

Host-header-based virtual hosts require different settings than the default proxy rule file used by the Agent for SharePoint. After defining your virtual hosts for your web applications, create proxy rules for your host-header-based virtual hosts.

Follow these steps:

  1. To preserve your current proxy rules, rename your existing proxyrules.xml file in the following directory:
    Agent-for-SharePoint_home\proxy-engine\conf
    
  2. Open the following file with a text editor:
    Agent-for-SharePoint_home\proxy-engine\examples\proxyrules\proxyrules_example2.xml
    
  3. Save a copy of the previous file using the following path and file name:
    Agent-for-SharePoint_home\proxy-engine\conf\proxyrules.xml
    
  4. Locate the following line:
    <nete:proxyrules xmlns:nete="http://www.company.com/">
    
  5. Replace http://www.company.com/ in the previous line with the name of your virtual host, as shown in the following example:
    <nete:proxyrules xmlns:nete="http://www.example.com/">
    
  6. Locate the following line:
    <nete:cond type="header" criteria="equals" headername="HEADER">
    
  7. Replace HEADER in the previous line with the following:
    HOST
    
  8. Locate the following line:
    <nete:case value="value1">
    
  9. Replace value1 in the previous line with the value of a host header you want, as shown in the following example:
    <nete:case value="sharepoint.example.com">
    
  10. Locate the following line:
    <nete:forward>http://server1.company.com</nete:forward>
    
  11. Replace the http://server1.company.com with the URL of the server to which you want to forward requests that use the header value from Step 8. Use the following example as a guide:
    <nete:forward>http://sharepointserver1.example.com</nete:forward>
    
  12. Add additional header values and destination servers by repeating Steps 8 through 11 on the following respective lines in the file:
    <nete:case value="value2">
    
    <nete:forward>http://server2.company.com</nete:forward>
    
  13. Locate the following line:
    <nete:forward>http://home.company.com$1</nete:forward>
    
  14. Replace the http://home.company.com in the previous line with the URL of a default site you want to use for requests not matching your web applications.
  15. Save the file and close the text editor.
  16. Restart the Agent for SharePoint.