NetTalk Central

Author Topic: Running two different Secure apps from the one server  (Read 2659 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
    • Email
Running two different Secure apps from the one server
« on: January 01, 2020, 05:30:09 PM »
Hi and Happy New Year.
May I extend commiserations to our Aussie NTers and hope the fires are soon out....

I have an address issue for an app I have running on an Amazon server.
I have two different folders on the server each having their own program and each having their own web folder and their own certificate folder
The First  is running from ports 443 and 80 and the address is secure- havings its own certificate
Its https://rji.timepeace.co.nz   

The problem is that for the second app , although achieving a secure certificate for it as well,  it will not run from straight
https://sria.timepeace.co.nz
but needs a port number    viz https://sria.timepeace.co.nz:8191

The 8191 is the secure port I have in the settings.

I dont know why this should be unless in the process of getting the certificate for the second app.the IP address is already known by LE?
I made a similar post early December, but in that I was asking to share the same folder not have different ones.......

Is there a simple solution?
Cheers
Richard
NT 11.28
« Last Edit: January 01, 2020, 07:11:47 PM by Richard I »

Jane

  • Sr. Member
  • ****
  • Posts: 348
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Running two different Secure apps from the one server
« Reply #1 on: January 01, 2020, 08:23:51 PM »
Browsers are hard-coded to try to talk to port 80 for HTTP and port 443 for HTTPS.  If you need to talk to a port other than that, you need to tell the browser what the protocol is (HTTPS) and what port the server is listening on.

I think your options are pretty much
1.  Do what you're presently doing (specify the port number for the second website).
2.  Do whatever Amazon requires to get a second IP address.  Use that for the second site and then it will be able to respond to a plain HTTPS on the default port 443.
3.  Go the multi-site route, where the host app listens on port 443 and passes the traffic along to whichever DLL has been requested.

Happy New Year!

Jane

Richard I

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
    • Email
Re: Running two different Secure apps from the one server
« Reply #2 on: January 02, 2020, 01:28:51 AM »
Thanks Jane,

Im staying with the Status Quo
but meanwhile, I will check out whether Amazon servers can have more than one IP address
and I know nothing about Multi-site - where can I find out about settings, template, coding  etc for  that ?

Cheers
Richard

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Richard I

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
    • Email
Re: Running two different Secure apps from the one server
« Reply #4 on: January 02, 2020, 01:45:10 PM »
Many Thanks Don,
Much appreciated...
Cheers
Richard

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Running two different Secure apps from the one server
« Reply #5 on: January 02, 2020, 05:35:02 PM »
Hi Richard,

You can have multiple external IP address on AWS if you use an Elastic IP as well as the original external IP. I haven't tried it, but i expect you could use multiple elastic IPs and point them all to the same box.

Also, you could use ELB (Load Balancer) It will allows you to have various external IPs (elastic IPs are best) and you can then map them to one EC2 instance on various ports. The downside is you'll need to use AWS to handle your certificates (as NT will only need to do http). This is called off-loading of SSL and allows NT to run faster by getting someone else to do the cpu intensive SSL encryption. But, frankly its a bit fiddly and you'll be paying AWS to do something you could probably do yourself.

Back to the first option, you should just be able to run two services on your EC2 instance and bind them to the appropriate IP. I've not personally tried to bind a server to an Elastic IP, but it should work. You cannot have two internal IPs on AWS (to my knowledge).

Regards
Bill