TomDuncan Active Member Licensed User Longtime User Sep 9, 2015 #1 If I have ctd.noip.me and tom.fred.com Can I serve both these sites from one IP address, one computer and one server. Sounded like a nice idea. Can it be done. Tom
If I have ctd.noip.me and tom.fred.com Can I serve both these sites from one IP address, one computer and one server. Sounded like a nice idea. Can it be done. Tom
Daestrum Expert Licensed User Longtime User Sep 9, 2015 #2 Providing each site connects on a different port it is possible. Upvote 0
TomDuncan Active Member Licensed User Longtime User Sep 10, 2015 #3 But isn't a web site by default mapped to port 80? Also with noip I have two names both mapped to the same incoming IP address. I have ctd.noip.me and tomduncan.noip.me Can I have both of these serving different site layouts. I.e. Different www folders. Upvote 0
But isn't a web site by default mapped to port 80? Also with noip I have two names both mapped to the same incoming IP address. I have ctd.noip.me and tomduncan.noip.me Can I have both of these serving different site layouts. I.e. Different www folders.
R Roycefer Well-Known Member Licensed User Longtime User Sep 10, 2015 #4 You can serve up two sites but they'll have to be running in the same server program. In each Handler, you can get the full request URI which will tell you whether your user was navigating to ctd.noip.me or tomduncan.noip.me and then you can decide what content to serve to the user. In this case, you shouldn't give users direct access to statically served pages as they might have ambiguous links. Another option is to have one server be secure (default port 443) and the other be insecure (default port 80) and then you can have two separate, normal server applications serving up static pages. You can also specify port numbers in your domain name: ctd.noip.me:1111 and tomduncan.noip.me:2222 and then you could have these go to two separate server programs running on the same computer. Upvote 0
You can serve up two sites but they'll have to be running in the same server program. In each Handler, you can get the full request URI which will tell you whether your user was navigating to ctd.noip.me or tomduncan.noip.me and then you can decide what content to serve to the user. In this case, you shouldn't give users direct access to statically served pages as they might have ambiguous links. Another option is to have one server be secure (default port 443) and the other be insecure (default port 80) and then you can have two separate, normal server applications serving up static pages. You can also specify port numbers in your domain name: ctd.noip.me:1111 and tomduncan.noip.me:2222 and then you could have these go to two separate server programs running on the same computer.
Daestrum Expert Licensed User Longtime User Sep 10, 2015 #5 It looks like no-ip allows you to redirect port 80 to any port you choose so you could have both running in one server program. Code: Copy ... srvr.Initialize("srvr") srvr.StaticFilesFolder = "www" ' files for first site srvr.Port = 51000 srvr.Start srvr1.Initialize("srvr2") srvr1.StaticFilesFolder = "www/1" ' files for second site srvr1.Port = 51001 srvr1.Start ... Upvote 0
It looks like no-ip allows you to redirect port 80 to any port you choose so you could have both running in one server program. Code: Copy ... srvr.Initialize("srvr") srvr.StaticFilesFolder = "www" ' files for first site srvr.Port = 51000 srvr.Start srvr1.Initialize("srvr2") srvr1.StaticFilesFolder = "www/1" ' files for second site srvr1.Port = 51001 srvr1.Start ...
TomDuncan Active Member Licensed User Longtime User Sep 10, 2015 #6 Does that mean on my modem I would redirect 51000 and 51001 to port 80 No I am missing something here. How will it know to go to which port. Or www or www/1 Last edited: Sep 10, 2015 Upvote 0
Does that mean on my modem I would redirect 51000 and 51001 to port 80 No I am missing something here. How will it know to go to which port. Or www or www/1
Erel B4X founder Staff member Licensed User Longtime User Sep 10, 2015 #7 You should redirect each domain to a different port. I recommend you to use two server apps instead of one. Upvote 0
You should redirect each domain to a different port. I recommend you to use two server apps instead of one.
Daestrum Expert Licensed User Longtime User Sep 10, 2015 #8 As Erel recommended it's better to have two servers running, if the app crashes it only takes one site off-line not both. Upvote 0
As Erel recommended it's better to have two servers running, if the app crashes it only takes one site off-line not both.