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.

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