Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Pete 210 posts 281 karma points
    Jul 26, 2011 @ 20:57
    Pete
    0

    Localhost multiple sites

    Hi, i've inherited a umbraco project from a customer, and just trying to get my head round how it works.

    One issue i've found is it has 2 sites on the node tree, but when I view the site on localhost it shows the first site, I can't see any setting where you can set which site will show in localhost, only the domain settings for when it's live on the net.

    Thanks

  • Jan Skovgaard 11242 posts 23390 karma points MVP 6x admin c-trib
    Jul 27, 2011 @ 00:12
    Jan Skovgaard
    0

    Hi Pete

    In the config folder on the filesystem you must open the umbracoSettings.config file and make sure that this line is set to true.

    <useDomainPrefixes>false</useDomainPrefixes>

    And make sure you have set up the hostnames for each root node by right clicking the on each of them and select "Manage Hostnames" and enter the your local domain names in here.

    Then you should be able to access both sites - please be aware that you may need to recycle the app pool when you have made the changes in the umbracoSettings.config file.

    /Jan

  • Pete 210 posts 281 karma points
    Jul 27, 2011 @ 10:03
    Pete
    0

    Hi Jan

    Thanks for the reply.

    I followed your instructions but it could not find the local sites. I also added the http headers in IIS to match the local domains in "manage hostnames" but still no luck.

    I've created another site node also for testing stuff out on, so I now have.

    http://live.localhost/
    http://practice.localhost/
    http://dev.localhost/

    Reading some other forums I notice that people have http://sitename.local/ instead of localhost, not sure if that's an issue?

    I'm on windows 7 (6.1 service pack 1), IIS 7.5.7600, Umbraco v 4.6.1 (Assembly version: 1.0.4029.25836)

    Pete

     

  • Rich Green 2245 posts 3918 karma points
    Jul 27, 2011 @ 10:11
    Rich Green
    0

    If you're running the sites from your localhost you'll need to add the sites to your hosts file http://www.ehow.com/how_5225562_edit-windows-hosts-file.html

    Rich

  • Paul Blair 466 posts 731 karma points
    Jul 27, 2011 @ 22:44
    Paul Blair
    0

    Edit your hosts file as indicated by Rich. It should look something like:

    127.0.0.1    live.localhost
    127.0.0.1    practice.localhost
    127.0.0.1    dev.localhost

    Go to IIS and select the site you wish to apply the hostnames to. Select bindings and add a hostname for each of the above (e.g. 1st hostname value will be live.localhost)

    In Umbraco Content section right click each root node and add the hostname to the appropriate homepage.

  • Pete 210 posts 281 karma points
    Jul 28, 2011 @ 13:39
    Pete
    0

    That did it, many thanks all.

    I notice that I did not need this: <useDomainPrefixes>false</useDomainPrefixes> set to true for having multiple domains, but did when the sites were on the live domain using subdomains.

    Peter.

Please Sign in or register to post replies

Write your reply to:

Draft