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


Create Proxy Rules for your Path-based Virtual Hosts

Path-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 path-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.netegrity.com/">
    
  5. Replace http://www.netegrity.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:case value="/dir1">
    
  7. Replace the /dir1 in the previous line with the path (URI) for which you want the request redirected. For example, if the path is /sales, all URLs containing /sales are redirected to the resource you specify.
  8. Locate the following line:
    <nete:forward>http://server1.company.com$2</nete:forward>
    
  9. Replace the http://server1.company.com with the URL of the server to which you want to forward requests that use the path (URI) value from Step 8. Use the following example as a guide:
    <nete:forward>http://sharepointserver1.example.com</nete:forward>
    
  10. Add additional header values and destination servers by repeating Steps 6 through 9 on the following respective lines in the file:
    <nete:case value="/dir2">
    
    <nete:forward>http://server2.company.com$2</nete:forward>
    
  11. Locate the following line:
    <nete:forward>http://home.company.com$1</nete:forward>
    
  12. 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.
  13. Save the file and close the text editor.
  14. Restart the Agent for SharePoint.