Don't miss out Virtual Happy Hour today (April 26).

Try our conversational search powered by Generative AI!

Setting up multiple sites using portnumbers instead of domain name

Vote:
 

Hi, I have a EPiServer instance with multiple sites. In our testenvironment we use domainnames in the siteUrl element, and this works fine. In our staging- and production environement the hosting company wants us to use portnumbers to identify each site instead, example: http://localhost:82 instead of www.site.no. We have a loadbalancer in front that sends the user to the correct site based on the portnumber. I haven't been able to get the setup with portnumbers to work as I want, so I wonder if it's possible to use portnumbers to indentify the sites in this kind of scenario?

Environment: EPiServer CMS 5 R2 SP2, Windows Server 2003

#40913
Jun 23, 2010 9:08
Vote:
 

Just set up hostheader info in IIS to send you to the correct site. You can specify port number for each hostheader entry. Use the servername (or external url for the server) in the Host name box, and the specified port number for the site in the Port box.

#40951
Jun 24, 2010 8:11
Vote:
 

If you are working on an enterprise site, you can use siteHosts in your config file:

<site siteId="EampleSite1" description="Example Site 1">
<siteHosts>
 <add name="test:81" />
</siteHosts>
<siteSettings ... />
</site>
<site siteId="ExampleSite2" description="Example Site 2">
<siteHosts>
<add name="*" />
</siteHosts>
<siteSettings ... />
</site>

#40952
Jun 24, 2010 8:18
Vote:
 

Hi,

Thank you.

I still can't get this working.

Examle of the setup:

The "main" site is running at http://localhost:86

The "extra" site is running at http://localhost:88

In the siteHosts i have the following settings:

Mainsite:
<siteHosts>
    <add name="*" />
</siteHosts>

Extrasite:
<siteHosts>
    <add name="http://localhost:88" />
</siteHosts>
( I have also added http://preprod.site.no/", but this didn't make any difference)

In <siteSettings> I use the siteUrl="http://preprod.site.no/" and
i have pointet the pageStartId to the startpage of the "extra" site

When I go to http://localhost:88 then I go to the main site instead of the "extra" site.

Can anyone see what I'm doing wrong here?

 

#40992
Jun 28, 2010 11:13
Vote:
 

Enterprise or "normal" installation??

#40996
Jun 28, 2010 12:47
Vote:
 

Enterprise

#40997
Jun 28, 2010 12:48
Vote:
 

In IIS, make sure that the main site has an host header entry for localhost at port 86 and the extra site has an entry for localhost for port 88.


If you have add name="*", that site will catch all urls if they are not defined in a separate sitehost section. You do not include http:// in the config file. Your config file should look something like this:
<site siteId="main" description="main site">
<siteHosts>
<add name="localhost:86" />
<add name="*" />
</siteHosts>
<siteSettings ... />
</site>
<site siteId="extra" description="extra site">
<siteHosts>
<add name="localhost:88" />
</siteHosts>
<siteSettings ... />
</site>

AND, make sure you have a valid enterprise license file!

#40999
Jun 28, 2010 13:05
Vote:
 

This works with EPiServer CMS 6, but not in CMS 5. In EPIServer CMS 5 we only use the host name as differentiator when selecting which site to map to, in 6 we also take the port number into account.

#41002
Jun 28, 2010 13:34
Vote:
 

Ok.  Didn't think about that... Seems like you need to make your hosting provider create dns names you can identify your sites with.

#41003
Jun 28, 2010 13:38
Vote:
 

Hi,

We had to do an exception with this Episerversite in the hostingenvironment and use domainnames. Now it works fine. Thank you for the answers.

#41021
Jun 29, 2010 10:36
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.