Error with multiple sites on single mojoportal & SQL install

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
5/6/2013 4:23:50 PM
Gravatar
Total Posts 92
Keep Smiling Phill

Error with multiple sites on single mojoportal & SQL install

Hi,

I am trying the build and test having a single install of mojoPortal sn MS SQL on my local machine and then build muiltiple sites off it.  I have read up on it and I took the Host Names approach.  BUT I am unable to get any of the child sites to work nor am I able to get the localhost site to work.  To get the root site to work I have to put in the following address into IE localhost\PJS_2 then it works.

I am running Windows 8 Pro with Media Center, MS SQL 2012 with management tools, mojoPortal 2.3.9.7, .NET 4.5.

I have tried to follow your instructions...

  1. Fresh install of mojoPortal & SQL
  2. Got root site working & connected to DB
  3. went to Administration | Site List | Create new site
  4. Created several new sites... (root - Phillip J Seaman / child - YachtLog Software / child - AnchorWatch / child - Mouse Pad)
  5. Added Host Name Mapping name to each site (www.PhillipJSeaman.com / www.YachtLogSoftware.com  / www.AnchorWatch.com  / www.MousePad.org  )
  6. Added 1 host Name for each site and saved each one.
  7. repeated for each child site
  8. Added the following lines to the hosts files...

            # 127.0.0.1       localhost

               127.0.0.1 www.PhillipJSeaman.com
               127.0.0.1 www.YachtLogSoftware.com
               127.0.0.1 www.AnchorWatch.com
               127.0.0.1 www.MousePad.org

If I type "localhost" into the address line of IE I get the "IIS7 Welcome" page

If I type in any of the addresses noted above I get an error...

--------------------------------------------------------------------------------------------------------------
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.

Most likely causes:

A default document is not configured for the requested URL, and directory browsing is not enabled on the server.

Things you can try:

If you do not want to enable directory browsing, ensure that a default document is configured and that the file exists.
Enable directory browsing using IIS Manager.

Open IIS Manager.
In the Features view, double-click Directory Browsing.
On the Directory Browsing page, in the Actions pane, click Enable.

Verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.

Detailed Error Information:

Module    DirectoryListingModule
Notification    ExecuteRequestHandler
Handler    StaticFile
Error Code    0x00000000

Requested URL    http://www.yachtlogsoftware.com:80/
Physical Path    C:\Users\Phill\Documents\My Web Sites
Logon Method    Anonymous
Logon User    Anonymous

More Information:

This error occurs when a document is not specified in the URL, no default document is specified for the Web site or application, and directory listing is not enabled for the Web site or application. This setting may be disabled on purpose to secure the contents of the server.

View more information »

-------------------------------------------------------------------------------------------------------------

I made sure I was in Admin mode whan I made the changes to the hosts file.
I watched the video.  But still get the error..

What the heck am I missing or doing wrong?

Phillip

5/7/2013 12:38:39 PM
Gravatar
Total Posts 92
Keep Smiling Phill

Re: Error with multiple sites on single mojoportal & SQL install

Okay attempt #3 to add info here without crashing IE!!!

hosts file contents...

127.0.0.1       localhost
::1  localhost

127.0.0.1 www.PhillipJSeaman.com
127.0.0.1 www.YachtLogSoftware.com
127.0.0.1 www.AnchorWatch.com
127.0.0.1 www.MousePad.org

-----------------------------------------------------------

entering local host address response...

 IIS7 Welcome page

------------------------------------------------------------

entering 127.0.0.1 into the address bar response...

127.0.0.1 - /

3/13/2013 10:28 AM <dir> AnnePerryArtworks
5/6/2013 11:52 AM <dir> aspnet_client
5/6/2013 11:52 AM <dir> Corinthian Software Inc
5/3/2013 7:30 AM <dir> mojoportal1
3/13/2013 10:31 AM <dir> Mouse Pad II
5/5/2013 7:22 PM <dir> PJS_2
5/7/2013 9:50 AM 168 web.config
3/13/2013 10:41 AM <dir> YachtLog_ServerCopy_12_21_2011

---------------------------------------------------------------------------------------------------------
The new primary (host) web site is PJS_2 with the rest as its child sites.

---------------------------------------------------------------------------------------------------------

If I enter www.PhillipJSeaman.com into the address bar I get... as it does for any of the addresses below!

www.phillipjseaman.com - /

3/13/2013 10:28 AM <dir> AnnePerryArtworks
5/6/2013 11:52 AM <dir> aspnet_client
5/6/2013 11:52 AM <dir> Corinthian Software Inc
5/3/2013 7:30 AM <dir> mojoportal1
3/13/2013 10:31 AM <dir> Mouse Pad II
5/5/2013 7:22 PM <dir> PJS_2
5/7/2013 9:50 AM 168 web.config
3/13/2013 10:41 AM <dir> YachtLog_ServerCopy_12_21_2011

---------------------------------------------------------------------------------------------------

Somehow my Default Web Site is not what it is supposed to be and that it doesn't point to PJS_2.
IIS7 Defaul Web Site | Manage Website | Advanced settings | Physical Path = C:\Users\Phill\Documents\My Web Sites

If I change the Default Path to the PJS_2 folder...
localhost still gets the IIS7 Welcome screen...
If I enter the acrual addresses www.PhillipJSeaman.com or www.MousePad.org or www.AnchorWatch.com I get the correct child sites.

------------------------------------------------------------------------------------

So it seems that I have messed up my localhost and 127.0.0.1 mapping.

Got any suggestions or thoughts on how I can resolve this and get my machine working the same way as everyone elses?  I don't want to have to type 127.0.0.1 every time.... besides it's wrong!

Thanks

Phillip

5/7/2013 12:45:52 PM
Gravatar
Total Posts 92
Keep Smiling Phill

Re: Error with multiple sites on single mojoportal & SQL install

Well I thought I had made some headway but I now see NOT!!!!

With the Physical Path of the Default Web Site pointing to the PJS_2 folder, which is an "application" I am now unable to access any of the Admin pages I get the following error...

Server Error in '/PJS_2' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: The configSource file 'mojoSiteMap.config' is also used in a parent, this is not allowed.

Source Error:

 

Line 730: --> Line 731: <globalization culture="auto:en-US" uiCulture="auto:en-US" requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="iso-8859-15" /> Line 732: <siteMap configSource="mojoSiteMap.config" /> Line 733: <webParts> Line 734: <personalization defaultProvider="mojoPersonalizationProvider">


Source File: C:\Users\Phill\Documents\My Web Sites\PJS_2\web.config    Line: 732

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18033           

----------------------------------------------

Now what do I do?

Phillip

5/7/2013 12:46:57 PM
Gravatar
Total Posts 18439

Re: Error with multiple sites on single mojoportal & SQL install

What you are calling child sites are not IIS web sites, anything that is not a root level IIS web site is just a folder or application not a child site, no such thing as IIS child sites.

You need to create actual IIS web sites and configure host name headers on them to make them respond to the host names you defined in the hosts file.

I've documented this as well as I know how in this video, this article and this article.

5/7/2013 12:49:36 PM
Gravatar
Total Posts 18439

Re: Error with multiple sites on single mojoportal & SQL install

or really if you want to use multiple host names sites with mojoPortal you just need one separate IIS web site (don't use default web site) and you need to add all the host name headers to that site which should point to an installation of mojoPortal files.

5/7/2013 2:51:19 PM
Gravatar
Total Posts 92
Keep Smiling Phill

Re: Error with multiple sites on single mojoportal & SQL install

Thanks Joe, that does help a little...

Maybe I have been looking at this the wrong way?

I have 3-4 products that I already have registered domain names for but no web sites.  I used to have separate web sites on separate servers for each product/domain, very messy!  What I was thinking was that I could take advantage of mojoPortals ability to manage (run) multiple web sites from a single install of mojoPortal and SQL.  (Of course I would be re-building each web site from scratch again as mojoPortal child sites.)

What I thought I could do was build the mojoPortal site with all my domain names (sites re-built in mojoPortal) as child sites and be able to build the domain names point to the the new child sites to mojoPortal.

Is this the best method to go or is there a better method to utilise mojoPortals flexability and functionality?

I was trying to follow the (http://www.mojoportal.com/video-hosting-multiple-sites-based-on-host-name.aspx ) video to acheive this.

What is your suggestion on the best use of mojoPortal to put these projects under one roof?  Can you please point me to the documentation pages to support your suggestion?

Thanks so much in advance
Phillip

5/7/2013 4:27:34 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Error with multiple sites on single mojoportal & SQL install

Hi Phillip, this is quite easy really. Do you already have one mojoPortal site working? If so, simple add additional bindings for your other domains to the same website in IIS (if using IIS 7.x, click on the web site node in the IIS Manager, then click Bindings... in the upper right "Actions" panel).

You also need to ensure the A Name records for your domains are pointing at the correct web server (you say you previously had them pointing at separate servers). Use ping to verify that your domains or sub-domains are pointing at the correct i.p. address.

Once you've done this, you can create child sites in mojoPortal, and in the site settings for each child site go to the "Host Name Mapping" tab and add your host name.

Once you have done this, your site should appear in a browser.

If you want the sites to share logins, add this to user.config

 <!-- Allow all sites to share same users and roles see http://www.mojoportal.com/muliplesites.aspx -->
 <add key="UseRelatedSiteMode" value="true"/>
 <add key="RelatedSiteID" value="1"/>
 <add key="RelatedSiteModeHideRoleManagerInChildSites" value="true"/>

And if you want to be able to delete the child sites again, add this:

<add key="AllowDeletingChildSites" value="true" />

If running some or all sites under HTTPS, add keys like this:

<add key="Site2-SSLIsAvailable" value="true" />

Hope this helps

5/7/2013 6:58:49 PM
Gravatar
Total Posts 92
Keep Smiling Phill

Re: Error with multiple sites on single mojoportal & SQL install

Thanks that is a lot of great tips....

1st let me sort out one thing.  The pointing to old servers and IP's is no longer an issue as I am starting each site from scratch within mojoPortal.  So thanks for the advice.

2nd when I select PJS_2 web site there is no "Bindings" option in the Action panel.  I only get the Bindings option when I select the Default Web Site.

I think my problem is with the IIS and hosts file...

If I type in "localhost" in the address bar I get the IIS 7 Welcome screen.
if I type in localhost\PJS_2 (the name of the application in IIS and my root site) I get the correct site showing.
If I type in www.phillipjseaman.com (the default host name of the root site)  I get the text directory listing for the default web site folders.
If I type in localhost\www.PhillipJSeaman.com of course I get a 404 error
If I type in www.AnchorWatch.com or any other valid address I get a text listing of all the folders under the default web site.

Here are the settings in my hosts file...

127.0.0.1       localhost
::1  localhost

127.0.0.1 www.PhillipJSeaman.com
127.0.0.1 www.YachtLogSoftware.com
127.0.0.1 www.AnchorWatch.com
127.0.0.1 www.MousePad.org

What am I missing?  I flle like I am so close but missing it by that much!

Phillip

5/8/2013 2:25:54 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Error with multiple sites on single mojoportal & SQL install

OK it sounds like you are running your main mojoPortal site as an "Application" below the default web site. You cannot set bindings for an application. See this help page explaining the difference. If correct, you need to add the bindings to the default web site.

I don't know why you would need to alter your hosts file at all - I've never had to do this for mojoPortal in a production web server environment - I should reset this to the default.

Incidentally, the anchorwatch and phillipjseaman domains do not currently resolve to the same web server, so you have some work to do at the DNS end before you are going to get any results.

5/8/2013 11:23:45 AM
Gravatar
Total Posts 92
Keep Smiling Phill

Re: Error with multiple sites on single mojoportal & SQL install

Hi Crispin,

Thanks for the pointers and explanation.

I am confused... should I be using "Web Sites" or "Applications" in IIS?

It doesn't seem to matter what I do I get the same results.  I did have it set up as an Application in IIS and as you can see from my previous notes the child sites failed.  I just went ahead and set it up as a Web Site (per your documentation).  I removed the references in the hosts file and added the "bindings" in IIS as "not assigned" & as 127.0.0.1 and I got the following results...

www.PhillipJSeaman.com - resolved correctly

  • if I click on the Home tab in the web site it takes me to the public web site on godaddy
  • if I click on any of the menu items across the top (sign in, site map, etc) I get an error page

www.AnchorWatch.com - FAILED
www.MousePad.org - FAILED (went to its site on the web (godaddy server))
www.YachtLogSoftware.com - FAILED (went to its site on the web (godaddy server))

I also tried leaving the names in the hosts file and got the same results.
In your documentation you note to give permissions to the ASPNET user... there are no ASP users on my machine!

I am getting worse results as a Web Site than I was as an Application.  Now it is a Web Site I am unable to get to the admin pages of mojoPoretal to chack or make any changes.  Oh, and I made sure App_Data & Data folders have the read/write permissions.

 

Back to a basic question.  To run in this scinerio on a shared server such as Arvixe which method is the best?  Web Site or Application?

Phillip

5/8/2013 11:27:02 AM
Gravatar
Total Posts 92
Keep Smiling Phill

Re: Error with multiple sites on single mojoportal & SQL install

Hosting for each of my sites here and a few more is currently on the GoDaddy servers, I have only single page sites up.

Hence this project and proposed method to consolidate them all under a single install of mp and MS SQL.

5/8/2013 12:03:20 PM
Gravatar
Total Posts 18439

Re: Error with multiple sites on single mojoportal & SQL install

Phil,

When you want to move these sites to hosting you are going to need a dedicated ip address (not a shared ip address) then you will need to point all your domain names to that ip address. It is going to be very challenging for you to then move the sites from your local machine to hosting.

My advice is don't create the sites and content on your local machine. Get one installation of mojoPortal working with a dedicated ip address in a hosted environment, point all of your domain name to that ip address and verify they work, then go ahead and create the multiple sites and content in mojoPortal right at the hosting. That will save you a whole lot of trouble and difficulty.

Hope that helps,

Joe

5/8/2013 12:12:48 PM
Gravatar
Total Posts 92
Keep Smiling Phill

Re: Error with multiple sites on single mojoportal & SQL install

WEB SITE ABANDONED....

I re-booted my machine and nothing worked at all.  All the addresses resolved to the godaddy server not my local machine.

I have gone back to making it an "Application" as I can get that to work when I enter localhost\pjs_2... I get my web site and the menus etc work.

Now to get the child sites to function.

I have gone to Administration | Site List and added the listed child sites and added their host names too.  I went to Bindings on teh Default web site and added www.yachtlogsoftware.com & www.anchorwatch.com both pointing to 127.0.0.1.  I then added both of them to the hosts file...

www.anchorwatch.com  resolves to the local machine and shows the folders under the Default Web Site

www.yachtlogsoftware.com resolves to the public site on go daddy.

Can someone explain why 1 kinds of works and the other doesn't?

-----------------------------------------------------------------------------------------------------

I guess where I am lost is www.anchorwatch.com is not an actual web site and deoesn't exists anywhere!  Except for inside www.phillipjseaman.com (PJS_2 the root) so how would the rest of the world know how to find it?  OR where to look?

The hosts file assumes an actual/physical web site and loops it back.
The Bindings seem to do almost the same thing.

What do I enter in the address bar to get to any of the child sites within MP? (i.e. localhost\pjs_2 gets me to the root www.phillipjseaman.com)

What I am hoping is that someone can show me how to enter www.anchorwatch.com and have it open the child site within MP!

I have followed all the videos and documentation and am totally confused. some because of the new versions of .NET and Windows etc and that the documentation is a version or two out. (I'd hate to be the one to keep all that documentation up to date)

Please help me
Phillip

5/8/2013 12:23:39 PM
Gravatar
Total Posts 92
Keep Smiling Phill

Re: Error with multiple sites on single mojoportal & SQL install

Hi Joe,

I was worried about transferring this project to the host but thought I'd deal with it later.  I am glad to see that you are thinking ahead of me and the issues involved then.

I have not approached Arvixe yet to see what hosting with a dedicated IP would cost.  It may be out of my current price range!  I also have another possible issue that may cause problems with building the sites.  I often go away in my RV to do my coding etc. and do not always have phone and slow or intermittant internet connection at best.  Which is why I have always liked mojoPortal as I can develop locally then upload the completed project and DB to the server when I get back home.

I thought that this would be a great solution and a slam dunk... not so huh!

hhmmmm  I will have to ponder on this new development and try to decide what the best course is.  Any suggestions on your part will be gratefully accepted.

Phillip

5/10/2013 11:08:18 AM
Gravatar
Total Posts 92
Keep Smiling Phill

Re: Error with multiple sites on single mojoportal & SQL install

Hi,

I am still having an issue with mapping of child sites.  I have watched the video and added the 127.0.0.1 lines to the hosts file.  I feel I am close but not quite there!!!!

When I type in localhost\PJS_2 I get the actual root that would be www.phillipjseaman.com

I then edit the hosts file and add all the www.domains to 127.0.0.1

127.0.0.1       localhost

127.0.0.1 www.phillipjseaman.com
127.0.0.1 www.yachtlogsoftware.com
127.0.0.1 www.anchorwatch.com
127.0.0.1 www.mousepad.org
127.0.0.1 www.anneperryartworks.com

Now when I type any of the domains listed above I get the Default Web Site's list of folders.
FYI

Default Web Site points to C:\Users\Phill\Documents\My Web Sites

My root web site PJS_2 (www.phillipjseaman.com) is a folder - Converted to an Application under the default web site

localhost\pjs_2 points to the correct folder and loads the mojoportal web site (root)

What and I missing for the "Child" sites created within mojoPortal to not work?

Once I understand this and get it working I can use it as a template system to try features and ideas in without having to do it on the live site.

Thanks
Phillip 
I created the PJS_2 folder under the Default Web Site which is in My Web Sites folder which in IIS I pointed the Default Web Site to.

5/10/2013 11:33:58 AM
Gravatar
Total Posts 18439

Re: Error with multiple sites on single mojoportal & SQL install

My advice is watch the video and read the docs again and again until you have understood the information in them. Your questions and the things you say you have done show that you have not understood it so far.

The hosts file things you have done are correct. But you have not understood what to do in IIS.

You should create a new root level IIS web site and use that, do not use the default web site, do not make a folder beneath a web site nor an application beneath a web site. It should be a root level IIS web site where the basic settings for the site point to the root folder of the mojoportal files. There should be the mojoPortal Web.config file in the root of the mojoportal files. There should not be any other web.config files in any parent folders above the mojoPortal files.

host names point to ip addresses

When multiple IIS Web sites share the same ip address then the IIS site needs bindings to have the host name so it can resolve requests to the correct site. What makes the Default web site the default is that it does not have nay host name headers in the bindings. That is why I say don't use it, as soon as you add it host name to the bindings it would no longer be the default web site.

neither host names nor ip addresses point to folders beneath an IIS web site, together they point to a Site.

5/10/2013 12:58:24 PM
Gravatar
Total Posts 92
Keep Smiling Phill

Re: Error with multiple sites on single mojoportal & SQL install

Hi Joe,

Well I got it working but I do not believe I am doing it correctly....

I left the hosts file with the pointers in it....

I created a new web site directly under the "sites" folder in IIS... I did not make it into an application... The root/localhost address worked as expected brinign up the root site of www.phillipjseaman.com...  When I tried to enter any of the other child web site names I still got an error...  I added each of the www.mydomain.com names to the "binding" and now they all work as expected.

I know I still do not understand IIS and may never understand it completely.  I hope that this setup will continue to work long enough for me to look at and test the features and functionality of mojoPortal.  Of course I can use it to test my new skins too...

I appreciate your patience but I just am not getting IIS and how it works.  Since it is working an am sorry but it might peeve you off but I am going to leave it as is so I can move forward.  Especially if I end up using Arvixe for my hosting as I assume they would take care of all that back end stuff.

What happened to the days when you learned 1 or 2 languages and could write applications that just worked anywhere? :-(

Phillip

You must sign in to post in the forums. This thread is closed to new posts.