MarcoC Posted September 20, 2023 Share Posted September 20, 2023 Hi all. Standalone Windows application, Delphi 10.4.2, UNIGUI 1.90.0 build 1568 On a Windows server with two public IPs I want that my Unigui app uses port 443 on a specific IP (port 443 is already occupied on the other IP, so I can't use it). On the production build, Server Module, OnBeforeInit event, I've put this code {$IFDEF Produzione} /// //////////// SSL.Enabled := TRUE; //kill the standard bindings Port := 0; SSL.SSLPort := 0; //create specific bindings Bindings.Clear; with Bindings.Add do begin IP := '54.76.228.197'; Port := 443; end; {$ENDIF Produzione} Once deployed I always get a "Could not bind socket error" : seems as port 443 is already in use, but it should be used *not* on 54.76.228.197, is my code wrong or have I to dig more on the Windows Server configuration? Thanks for your help. Quote Link to comment Share on other sites More sharing options...
MarcoC Posted September 28, 2023 Author Share Posted September 28, 2023 Sorry, any chance to know if my code to bind a single server IP is correct or not? Or, better, I should bind the internal IP and not the external one like 54.76... ? Sorry for my english and thanks for any contribute. Quote Link to comment Share on other sites More sharing options...
Norm Posted September 29, 2023 Share Posted September 29, 2023 Unfortunately, I think you are asking the wrong questions that nobody can answer. To start off : - Can you confirm that your app has been tested successfully on http://localhost and on which port. - What url are you to trying to use for the deployment? - Are you using the hyper-server for deployment? If not, I strongly suggest you try that because it takes care of all the SSL and port issues and you don’t have to configure anything in the server module. The docs on this are very easy to follow. What I can tell you is this: - Forget about the fact that your server has multiple IP’s because that is irrelevant. Which of the external IP’s is used is determined by the domain (url) of your app. - Forget about port 443 because your app has no control over that. This is an external port that all https traffic travels over. As long as your app is configured for SSL your firewall will do the rest. - There is nothing wrong with multiple SSL configured apps using the same external IP. So you can serve multiple SSL apps over any one of your server’s IP addresses. The firewall will deliver the traffic to the correct app based on the app’s internal port binding. Feel free to contact me directly and I'll try to help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.