locked
Ports for Different SharePoint Sites on Same Server RRS feed

  • Question

  • Hi there,

    One of my client has a weird requirement about the usage of ports for different sites provisioned on same farm. The situation is as follows:

    The environment has two main websites:

    1. Intranet Portal: Corporate intranet for all employees, it is the SharePoint-80 webapplication in IIS using the default authentication mechanism (Active Directory). This site is already live.

    2. Family Portal: This is another site meant for external users. The content of this site is different from Intranet Portal and there is a huge difference in authentication mechanism. This site must support Anonymous, Active Directory, FBA. This site is under UAT as of now

    When I was doing the RA for Family Portal, after listening to their requirements I suggested to create another webapplication because of difference in authentication. Since SharePoint-80 had already occupied port 80, I created this new webapplication on port 95 and then provisioned the Family Portal on it. Everything is ok but some of external users are not able to access this Family Portal from their own corporate networks because of some port restrictions on their side. 

    Now my client is blaming me that I shouldn't have used a different port. Was it somehow possible to put both these sites on the same port? I know its stupid question but it's from my client. Can anybody please confirm me that whatever I did was correct?

    tks

    Friday, January 6, 2012 7:54 AM

Answers

  • Hello,

    when hosting multiple web applications, you have to consider to have a different host header or port. The combination host header + port must be unique to ensure a fully functional and reachable system.Example:

    • intranet.demo.info on port 80 and extranet.demo.info on port 80 are ok. Note we have different host headers
    • intranet.demo.info on port 80 and intranet.demo.info on port 85 are ok. Note we have different ports
    • yourservername on port 80 and yourservername on port 85 are ok. The server name is the host.

    If you want to solve the problem you have to follow these steps:

    • define separate host headers for the intranet and extranet (if not already done)
    • change the alternate access mappings in SharePoint central admin to reflect the host and ports you defined
    • change the IIS bindings for the web applications on every web server to reflect the new host and port bindings

    Here some reading material that might help you.

    hope this helps,

    patrick



    follow me if you want on:
    my blog http://www.lamber.info
    Twitter: @patricklamber
    Friday, January 6, 2012 8:26 AM

All replies

  • Hello,

    when hosting multiple web applications, you have to consider to have a different host header or port. The combination host header + port must be unique to ensure a fully functional and reachable system.Example:

    • intranet.demo.info on port 80 and extranet.demo.info on port 80 are ok. Note we have different host headers
    • intranet.demo.info on port 80 and intranet.demo.info on port 85 are ok. Note we have different ports
    • yourservername on port 80 and yourservername on port 85 are ok. The server name is the host.

    If you want to solve the problem you have to follow these steps:

    • define separate host headers for the intranet and extranet (if not already done)
    • change the alternate access mappings in SharePoint central admin to reflect the host and ports you defined
    • change the IIS bindings for the web applications on every web server to reflect the new host and port bindings

    Here some reading material that might help you.

    hope this helps,

    patrick



    follow me if you want on:
    my blog http://www.lamber.info
    Twitter: @patricklamber
    Friday, January 6, 2012 8:26 AM
  • hey thanks patrick....you mean I can create more webapplications on a single port? Note that the one site is FBA+Anonymous+LDAP and another is just LDAP authentication.

    I just now tried create one more webapplication on same port 80 (already in use by SharePoint-80 site), it gave me an error saying its already in use. select another port or host name. Is this expected?

    Friday, January 6, 2012 9:07 AM
  • Hey,

    please note that a SharePoint WebApplication can be mapped to one or more IIS web applications.

    If you create a new one in SharePoint, a new IIS web application is created in IIS. In IIS you have to guarantee that you have unique hostname + port (as described before). If you do not do this, then your IIS web applications (and so also the access to SharePoint) are broken.

    Please follow the instructions I gave you before. This should help you out.

     

    In your case I would use two web applications (one for the intranet and one for the extranet). They can share the same port, but they must have different host headers (e.g., intranet.demo.info and extranet.demo.info).

     

    br,

    patrick



    follow me if you want on:
    my blog http://www.lamber.info
    Twitter: @patricklamber
    Friday, January 6, 2012 9:29 AM
  • You should also be aware that Patricks methods above will also let each SharePoint/IIS web application have more than one host header. Using the info in the links he has provided, rather than creating a new web application you should be able to add a new host header and port to your existing application.

    Friday, January 6, 2012 11:14 AM
  • Hi,

    In short, yes, you can have more than one web site on a single IP and port (in this case, port 80). This is functionality provide to SharePoint by IIS and is called Host Headers. You can use the following links to get more information:

    http://www.it-notebook.org/iis/article/understanding_host_headers.htm

    http://technet.microsoft.com/en-us/library/cc753195%28WS.10%29.aspx


    JD Wade
    Senior SharePoint Consultant, MCTS
    Horizons Consulting, Inc.
    Blog: http://wadingthrough.com
    Twitter: http://twitter.com/jdwade
    Friday, January 6, 2012 4:23 PM
  • As has been pointed out, each web application must have either a different port or a different host header. It is recommended to use different host headers, since this makes for a much simpler configuration as you are using the standard HTTP port (80). Since you need different authentication methods and you are accessing different content you need to create two web applications, (as you have done). However, instead of putting the second web application on a different port, you should have simply kept it on port 80 and used a unique host header.
    Imagine what we could be...If we could just imagine. Daniel A. Galant
    Monday, January 9, 2012 5:03 AM