On Unix it is configured in httpd config file. I would look at IIS settings for httpd.
Adding SSL to a website that's not on port 80
I've got an IIS issue that hopefully someone here has run into before. I have 5 websites, all of which are on a test Windows 2019 server. Because it is a test system, I can't get alternate names entered into our DNS system (and I don't have rights to that anyway). The websites have the same server name, just different ports, i.e., server1:999, server1:888, etc. One website is required to have SSL enabled, but with the site already assigned to a different port, how can that be configured?
Windows development | Internet Information Services
6 answers
Sort by: Most helpful
-
-
MotoX80 36,291 Reputation points
2023-01-11T14:16:10.7166667+00:00 In the Action pane, under Edit Site, click on Bindings. Add an HTTPS site on the desired port and select a certificate to use.
See also:
https://msftwebcast.com/2019/11/create-and-bind-a-self-signed-certificate-in-iis-10.html
-
Sanjay Singh 171 Reputation points
2023-01-11T16:05:21.26+00:00 Try to add different hostnames with different ports on IIS binding and test. You can add this hostname on the DNS A record to resolve the hostname if needed.
-
Bruce (SqlWork.com) 77,766 Reputation points Volunteer Moderator
2023-01-11T17:02:27.21+00:00 the ssl certificate is tied to the hostname, not the port. the default port for https is 443, but can be overridden. ex:
https://localhost:5001
you must create a ssl cert for the test server dns name and install. then for the site you want ssl, add the protocol and specify a unique port.
your network group should define the certificate so it is trusted. but you can use a self-signed cert. but this will need to be trusted by each client.
-
Lex Li (Microsoft) 6,037 Reputation points Microsoft Employee
2023-02-16T09:58:23.1733333+00:00 One common approach is,
- On the test server, create all IIS sites on port 80 and 443 with proper site bindings to match your production server.
- As administrator, modify hosts file on your dev box to include the necessary records there to emulate DNS settings for those domains, so that browsers on your dev box can connect properly to the test server with those domain names. Then you can configure certificates just like your production server.
Once you finish testing on the test server, modify hosts file on your dev box so it switches to use the real DNS records to connect to the production machine.