NetTalk Central

Author Topic: Multihost Qs  (Read 5354 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1871
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Multihost Qs
« on: July 22, 2019, 08:04:28 AM »
Hi, Im learning about multihost and have some Qs:

1- I dont have GPF reporter but can compile the example without problem, is this ok?
2- In the doc pdf you can read:
This technique does not work for secure sites, because with a secure site the host name is
encrypted. Thus the certificate is needed to decrypt the host name, but without the host name it’s
impossible to know which certificate to use.
But in the main host there is a certificate tab
Does it means I can use only one certificate obteined by the host for all sites?
Is there an updated doc of multi host?
3- What does Porpogate Delete session PDS means?
4- Only way of testing the sites is using the Host windows file to redirect them to the host IP (you cant use ports in the host file IPs), changing the host IP to 80 from 88 works ok but in the Notes tab it still says host is in port 88.
« Last Edit: July 22, 2019, 01:24:40 PM by michelis »
-----------
Regards
Alberto

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Multihost Qs
« Reply #1 on: July 22, 2019, 02:01:51 PM »
Hi, Im learning about multihost and have some Qs:

1- I dont have GPF reporter but can compile the example without problem, is this ok?

Never tried it but maybe so. 

Quote
2- In the doc pdf you can read:
This technique does not work for secure sites, because with a secure site the host name is
encrypted. Thus the certificate is needed to decrypt the host name, but without the host name it’s
impossible to know which certificate to use.
But in the main host there is a certificate tab
Does it means I can use only one certificate obteined by the host for all sites?

You'll have multiple certificates depending on how many domain records you have.

Quote
Is there an updated doc of multi host?

If there is, I have never seen nor heard of it.  The current doc is still pretty accurate.

Quote
3- What does Porpogate Delete session PDS means?

I'm not sure.

Quote
4- Only way of testing the sites is using the Host windows file to redirect them to the host IP (you cant use ports in the host file IPs), changing the host IP to 80 from 88 works ok but in the Notes tab it still says host is in port 88.


I have been using a multi-site host server for several years now.  It's a pretty clever and useful tool.

You can have numerous domains point at one IP address and the multi-site host will handle the rest.

For example:

   siteone.michelis.com
   sitetwo.michelis.com
   sitethree.michelis.com 

could all point to the same DLL or separate DLL's in the host.exe.

Or you can have an assortment of domains. 

Main points are:

Make sure the WebServer and WebHandler procedure in each DLL has the correct prototype/parameter per the docs.

Make sure the DLL path, Web folder path, and so on are correct in the Webservers.tps table.

It is vital that the host.exe and all DLL's are compiled with the same version of NetTalk.

On the Security and Site tabs, make sure all relative paths are correct. 

Essentially, it's just one webserver that's acts as a domain "traffic cop" directing traffic to where it needs to go based on the name of the domain.

If you have further questions, I'll help in any way I can.

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Multihost Qs
« Reply #2 on: July 22, 2019, 10:54:08 PM »
Hi alberto,

>> 1- I dont have GPF reporter but can compile the example without problem, is this ok?

yes, it will compile and run ok. The big problem though is that if _any_ DLL causes a GPF on load then the whole server comes down. With GPFReporter the server will immediately restart itself (and disable the offending DLL.)
So without GPF Reporter you may want to use an external service to restart the server if it goes down.

>> 2 - In the doc pdf you can read:
" This technique does not work for secure sites, because with a secure site the host name is encrypted."

this statement is obsolete. Support for multiple domains (via "Site Name Indication (SNI)" was added (and became popular) since that doc was written.

>> Is there an updated doc of multi host?

Are you reading the PDF? No I don't think that doc has been updated.

>> 3- What does Propagate Delete session PDS means?

The WebServer (ie Host Exe in this case) is in charge of cleaning up sessions. But you may have code in your DLL which is needed when cleaning sessions. (In WebHandler, NotifyDeleteSession method.) So the Propagate means that the call to delete sessions is being passed down to the WebHandler in the DLL.

>> 4- Only way of testing the sites is using the Host windows file to redirect them to the host IP.

It's not the "only" way, but yes, it's usually the simplest way (unless you have quite a fancy router.)

>>  (you cant use ports in the host file IPs),

correct. (and you don't need to - if you are running locally on port 88 then just direct to port 88.
For example, in your hosts file you might set
www.capesoft.com   127.0.0.1
Then in your browser go to http://capesoft.com:88

Then in your "site list" of expected domains you would be looking for capesoft.com:88
(I think. going from memory. try it and see)

>> changing the host IP to 80 from 88 works ok but in the Notes tab it still says host is in port 88.

Then you probably didn't change it in the right place. Where did you change it?

cheers
Bruce


Alberto

  • Hero Member
  • *****
  • Posts: 1871
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Multihost Qs
« Reply #3 on: July 23, 2019, 03:35:16 AM »
Hi Bruce,

>>>Support for multiple domains (via "Site Name Indication (SNI)" was added (and became popular) since that doc was written.
How can I learn how to use this SNI and obtain a certificate for each server? any doc?

>> changing the host IP to 80 from 88 works ok but in the Notes tab it still says host is in port 88.
>>Then you probably didn't change it in the right place. Where did you change it?
From the certificates Tab

-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Multihost Qs
« Reply #4 on: July 23, 2019, 05:01:13 AM »
>> How can I learn how to use this SNI

you don't have to learn how to use it. It's automatic. If a request comes in on a domain listed in your list of servers, then it just works (and the correct certificate is used.)

>> and obtain a certificate for each server? any doc?

LetsEncrypt in the Host is "similar" to LetsEncrypt support in a regular web app. The difference is that the domains list is constructed for you from your list of registered domains. It'll get certificates for all those domains for you.

cheers
Bruce