NetTalk Central

Author Topic: Multi-Site host app  (Read 17627 times)

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Multi-Site host app
« on: March 11, 2012, 07:39:55 PM »
Bruce,

     I have compiled the multi-site host app and the site1 app.  I have two issues.
 
1.  When I first log in I see the screen in clip1.png.  It seems there are missing icons on the site buttons at the top.

2.  Also, I find I cannot open the site1 home page or the site2 static pages.  Site1 is on port 8003 and site2 is on port 8080.  Both these ports are open on the firewall.  See servers.png for a screen shot of the servers list.

     I have your Developing Web Applications book, and the chapter dealing with the multi-site host details a full pathname variable set up in the dictionary.  When looking at the dictionary for the example app, I don't see the use of a global variable.  Instead, I see the use of webservers{prop:name} in the process link embed of the WebHandler.  Are both these techniques valid or should I be using one or the other?
     I have checked the prototypes of the WebServer and WebHandler procedures and they both have the name attribute entered.  Dynamic DLL support is also checked.  I'm using C8.8778 ABC and NT 6.25.  Any thoughts why I can't get to the two sites?

Thanks,

Jeff


[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Multi-Site host app
« Reply #1 on: March 12, 2012, 02:26:45 AM »
<< 1.  When I first log in I see the screen in clip1.png.  It seems there are missing icons on the site buttons at the top.

indeed - it's looking for the favicons of those two sites, and they don't exist (at least not in the example.)

>> Also, I find I cannot open the site1 home page or the site2 static pages.  Site1 is on port 8003 and site2 is on port 8080.  Both these ports are open on the firewall.  See servers.png for a screen shot of the servers list.

the whole point of the Multi-Site host is that they allow your dll's to share a _ip and port_ address - using the hostname alone as the differentiator. If the sites were indeed on different ports, they would have no need of the host. So, in your case, _all_ the sites are on the same port as the host. (in this case :88).

>>    I have your Developing Web Applications book, and the chapter dealing with the multi-site host details a full pathname variable set up in the dictionary.  When looking at the dictionary for the example app, I don't see the use of a global variable.  Instead, I see the use of webservers{prop:name} in the process link embed of the WebHandler.  Are both these techniques valid or should I be using one or the other?

both approaches, and indeed any other approach for setting the name, are valid. I prefer setting the name explicitly in the ProcessLink method - which is, as I recall, what the example does. Note that p_web.site.apppath in this context contains the path to the _dll_ not the host exe, which can be useful.

cheers
Bruce


jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: Multi-Site host app
« Reply #2 on: March 12, 2012, 06:33:17 AM »
Bruce,

     I'm still confused.  If site1 is on 127.0.0.1:88 and site 2 is on localhost:88, how would I open the server management web site, which is also on 127.0.0.1:88? 

Thanks,

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Multi-Site host app
« Reply #3 on: March 12, 2012, 07:13:53 AM »
by using an address, that points to the same machine, but is neither of those.
for example, my machine is 192.168.2.11 so if I was running on my machine I'd do it with
http://192.168.2.11:88

The example is somewhat contrived because I don't have a bunch of dns settings set up as one would in the real world. So, if I installed this on my server I'd have www.capesoft.com:88 and www.faswin.com:88 and so on.

cheers
Bruce

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: Multi-Site host app
« Reply #4 on: March 12, 2012, 09:45:48 AM »
Bruce,

     Ah!  Now I see.  I have it working now, all except the static pages from site2.  Not a big deal so I'm going to move this to our main server and test two live dll apps.  Thanks for all your help.

Jeff

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: Multi-Site host app
« Reply #5 on: March 12, 2012, 05:28:22 PM »
Bruce,

     I'm still testing on my development machine, trying to run the host app on port 443.  Can the multi-site host run on port 443?  I ask because I get the error shown in clip3.png.  The settings tab is set as seen in clip1.png and the general tab of the NT object is seen in clip2.png.
     I presume that the host app must be on port 443 as do all the other apps I wish to run over 443.
     I checked my firewall and both inbound and outbound rulles allow 443. 
     I created my own self-signed wildcard certificate by using *.breasthealthcrisp.org.  Perhaps this is the issue and I need to move this to the server for that domain.  What do you think?

Thanks,

Jeff

[attachment deleted by admin]
« Last Edit: March 12, 2012, 05:33:23 PM by jking »

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Multi-Site host app
« Reply #6 on: March 12, 2012, 07:38:03 PM »
not sure it will work locally without certificates.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Multi-Site host app
« Reply #7 on: March 12, 2012, 10:36:11 PM »
I think the 3rd pic is the most instructive.
it's saying it did connect, but the browse has opted not to display the page, presumably because it's a self-signed certificate.

try another browser, or add your site to the right IE zone or something.

cheers
Bruce

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: Multi-Site host app
« Reply #8 on: March 13, 2012, 12:18:14 PM »
Bruce,

     Something does not seem right.  I have the host.exe out on my server.  I load the host and it defaults to port 88.  From the browser on the server I can get to the website manager using
http://192.168.24.160:88.

     Next, I change the Listen on Port to 8888, click save, and try http://192.168.24.160:8888.  It does not work.  However, http://192.168.24.160:88 continues to work even though I have set the Listen to Port to 8888.  Is this expected behavior?  It would seem the Listen on Port is not being set to the new port.  The settings.xml file does show the newly set port at 8888.

Thanks,

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Multi-Site host app
« Reply #9 on: March 14, 2012, 12:14:48 AM »
when changing the port you need to restart the server. I haven't added the code to the host yet to do that "on the fly".

cheers
Bruce

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Multi-Site host app
« Reply #10 on: March 14, 2012, 07:23:59 AM »
Bruce,

That does not seem to work either.  Always defaults to 88.

Thanks,

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Multi-Site host app
« Reply #11 on: March 14, 2012, 11:23:47 PM »
did you click the "save" button on that tab after changing the setting?

cheers
Bruce

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Multi-Site host app
« Reply #12 on: March 15, 2012, 06:58:47 AM »
Bruce,

     Yes, I did click the save button.  As I mentioned earlier, the settings.XML file does contain the new port, but when I re- start the Server, it defaults back to 88.

Jeff

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: Multi-Site host app
« Reply #13 on: March 16, 2012, 08:50:59 PM »
Bruce,

     In the Weserver procedure, Init embed, code is setting the sg:ListenOnPort variable to 88.  I changed this to my port and now I'm making some progress.  I presume things such as this should be coming from the settings.xml tag but it does not appear this is working yet.  I'll code for this and see howw far I get.

Thanks,

Jeff

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: Multi-Site host app
« Reply #14 on: March 17, 2012, 09:54:45 AM »
Bruce,

     I have had limited success with the host and site1.  However, I cannot get one of my actual sites to work.  It always sets to Inactive.  If I uncheck inactive in the server manager, the actual host.exe app on the server seems to reset and then hangs. 
     I have attached an image of the sever manager screen, see servers.png.  The host and my app have been compiled with C8.8778 and NT 6.25.  I set the name explicitly in the process link method.
     I have the clarion dll's in the host folder as well as the certificate folder.  I do not have clarion dll's or a certificate folder in the dll app folder...is this necessary anyway?  In addition my dll app folder is not directly under the host folder.  I beleive this is allowable as well...is this right?
     Any other things I should look at?  I'm at a loss here.

Thanks,

Jeff

[attachment deleted by admin]