NetTalk Central

Author Topic: Sub Domains in multi site  (Read 5395 times)

MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Sub Domains in multi site
« on: October 20, 2014, 08:03:56 PM »
Hi all, I have the multi site app working

a DLL is on say 192.168.0.101   and all is good

I go to Update Servers and put what I think is a sub domain
Login.192.168.0.101

and when I point the browser at Login.192.168.0.101  I cant get the page to be served

Am I missing something in my understanding of sub domains ?  Image below

Thanks
Kevin


[attachment deleted by admin]

lkeyser

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Email
Re: Sub Domains in multi site
« Reply #1 on: October 21, 2014, 05:45:27 AM »
Hi Kevin

Login.192.168.0.101 is not a valid domain name. A valid domain name is something like this.

mywebsite.com  = parent site
myhobbies.mywebsite.com = Sub domain

The next important thing about multisites, the way I understand it (Im  sure there is a more technical explanation).
It “listens” for the name of the website and will redirect you to the appropriate website on the same IP address, using multi host. 

What I do when I do development on my local pc. 

I create “fake” domain names. I edit my c:\windows\system32\drivers\etc\hosts file with notepad, and it work fine. Just remember to remove them after you’ve done.

Regards
Louis

[attachment deleted by admin]

MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Sub Domains in multi site
« Reply #2 on: October 21, 2014, 03:42:33 PM »
Thanks for that Louis, I can see what you say with the ip address not being a domain name

So I went to our web site of www.3d.com.au  and put the host.exe there (which serves the static pages nicely)

I then went to Update Servers and made a second entry for "LocalHost" and pointed this to the test app "SITE1" of the Capesoft examples  - it serves up correctly

However, if I rename the "Host Name" to  test.3d.com.au
This did NOT work  (see red section in image below)

From what I read of the doco, the host should see this entry in its TPS file and match it to the DLL

Any ideas anyone?




[attachment deleted by admin]
« Last Edit: October 21, 2014, 05:07:27 PM by MyBrainIsFull »

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Sub Domains in multi site
« Reply #3 on: October 21, 2014, 05:01:06 PM »
did you add a dns entry for your sub domain?

MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Sub Domains in multi site
« Reply #4 on: October 21, 2014, 05:18:24 PM »
Thanks for the response Kev (ps great name)

I did try that, with the public and then the internal ip address (as I am new to this host file since today - try both options)  - Even shutting the host.exe down and restarting it after modifying the host file

I have attached an image, I assume this is correct how I have done it, as in I didnt use the www prefix

Cheers
Kevin




[attachment deleted by admin]
« Last Edit: October 21, 2014, 05:23:12 PM by MyBrainIsFull »

MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Sub Domains in multi site
« Reply #5 on: October 21, 2014, 06:23:57 PM »
One step closer, but still no cigar - does anyone have any clues? 

With the setup shown in the image

IF I log onto the server, and run firefox from the server  IT WORKS ! ! !  Yay
BUT
IF I use a workstation to hit www.test.3d.com.au   IT  FAILS     
-    same for   test.3d.com.au

updated image attached.

K

[attachment deleted by admin]

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Sub Domains in multi site
« Reply #6 on: October 21, 2014, 09:32:41 PM »
Have you setup the port forward for the server? Sounds like port 80 is being blocked or just not being forwarded to your server.

MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Sub Domains in multi site
« Reply #7 on: October 21, 2014, 09:36:05 PM »
No mate, you can hit www.3d.com.au and it responds ok
so port 80 is as always being forwarded to the server.

K

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11181
    • View Profile
Re: Sub Domains in multi site
« Reply #8 on: October 21, 2014, 11:29:18 PM »
are you setting the host file on all the text client PC's?
Or only on the server PC?
you need to set it on the client.

cheers
Bruce

MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Sub Domains in multi site
« Reply #9 on: October 22, 2014, 01:20:57 AM »
Boy oh boy, I can see why people might get this wrong.

Thanks for your input Bruce, but your explanation has confused me somewhat.
So I have drawn a diagram, Multi site for dummys.....  includes me apparently.

When you say "On the Clients pc's"
I dont get it, I thought you only had to set the host file on the server

As per my diagram
request for test.3d.com.au comes out of das cloud - down the interWebs
DNS points it to 120.146.159.14
ADSL takes this and port forwards the port 80 request to internal pc on 192.168.0.105    - known lovingly as  "Mr Server"

www.3d.com.au has been here for quite a while, now served up as a static page by HOST.exe

All is good

NOW,  we add example (59)'s Site1.DLL as a player,   set to respond to test.3d.com.au as a sub domain.

The servers host file takes the name "test.3d.com.au" and points it to 192.168.0.105

And when you open firefox on the server, it works

Now someone in another city (say London) opens firefox and asks for "test.3d.com.au"
The domain 3d.com.au resolves to 120.146.159.14:80
That hits the adsl modem, and gets forwarded to 192.168.0.105:80
The host file takes the sub domain and directs it to 192.168.0.105:80

The host picks this up and from the value Q sees that it was destined for the sub domain "test" and looks in its TPS file to find the DLL it needs to hit.

SO = = = = =  Is this correct Bruce?  and if so, what do you refer to as the clients pc's,  are you saying the pc in London is the client to the server?

Thanks
Kevin





[attachment deleted by admin]

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
    • Email
Re: Sub Domains in multi site
« Reply #10 on: October 22, 2014, 02:48:50 AM »
Hallo,

Ok I think you misunderstanding something. You cannot simply add in your multi site web server sub domains for your domain (www.3d.com.au) this sub domains has to be added from your cPanel where you host your domain. You have to modify "Advanced DNS Zone Editor" like:

NAME = test.3d.com.au
TTL = default (14400)
CLASS = IN
TYPE = A
RECORD = SERVER IP (in your case the external IP where you host web server)

Be patient changes here could take some hours until DNS propagate.
After this it should work 100%.


But if you want to test on your LAN then you have to make this changes on every computer (c:\windows\system32\drivers\etc\hosts).
Ans also here you have to flush DNS to propagate.

open CMD and type: ipconfig /flushdns
then it should works.


Good luck!
Robert



 

MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Sub Domains in multi site
« Reply #11 on: October 22, 2014, 03:18:29 AM »
WOW I LOVE THIS

Just as I got off the merrry - go - round and think I understand it, another challenge pops up

Thanks Robert, but in all truth I have no idea what you are talking about.

I had imagined that running the host with a sub domain would allow me to internally manipulate several DLL's to serve up content to one SOCKET.

I have no idea what a cPanel is, and I am guessing from your description of time to resolve that you are describing a master DNS setting that needs to propagate through the internet.

Whereas I thought the concept was to my take the IP/Port as a socket, and for the host.EXE on the pc (server ) determine what the human typed as part of the URL to me as    "TEST"  that hit 3d.com.au            - ie the host exe is hit and the third (or forth) level domain of "test" is resolved by NT8 Host.exe as part of the components of the URL, ie the Value Q,  and thus   IT   (the host.exe)  directs the url to the DLL

I dont see why I need to make any setting into the internet to allow DNS servers to propagate my desire to create a sub-domain - This is certainly not in the doco...

Please excuse my ignorance if I have misunderstood this.

I look forward to anyone else that can enlighten this lively debate

Kevin, in Sydney

Computers, they will keep us all in a job........





kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Sub Domains in multi site
« Reply #12 on: October 22, 2014, 05:09:46 PM »
Robert is correct. cPanel is a web interface but whoever hosts your domain name (not server your actual domain name you pay for) is usually where you would add the dns for your sub domain. They don't default to the same as your www name. Try it on any website test.microsoft.com. I guess you didn't understand when I asked "did you add a dns entry for your sub domain?"

MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Sub Domains in multi site
« Reply #13 on: October 23, 2014, 01:40:04 AM »
Yes Robert is correct - I called up my mate who handles this, he made *.3d.com.au point to 3d.com.au so now I can get any sub domain working,  and it works !!

So for all the people out there like me

- Multi Site app (59) the Hose.Exe
if you are using it locally with
- localhost
- 127.0.0.1
- 192.168.X.X  (whatever your router is set to)
Then you can do this with no problem

If you want to use this on the internet with your domain name, then you have to do what Robert says, get the sub domains set and let them propogate,  or you cloud is just going to rain on you.

Thanks for your help Kevin and Robert and Louis


terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Sub Domains in multi site
« Reply #14 on: October 24, 2014, 12:40:27 AM »
Also thank you Kevin for coming back with the solutions you found.
Sometimes I have seen or suggested  a solution  to a problem and the person with the problem  never comes back to say it succeeded or failed so we never know if the suggestion worked or whether the person went down another path and found a better answer.
Feedback like this is invaluable (to me at least ;-) )
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186