I currently have several regular http servers and 1 https server. I would like to add another https server with the same public ip.
I have something similar to
server {
listen 443 ssl;
server_name sub1.example.com;
ssl_certificate sub1.example.com.crt;
...
}
server {
listen 443 ssl;
server_name sub2.example.org;
ssl_certificate sub2.example.org.crt;
...
}
The issue I am encountering is with IE8. I receive sub1's certificate instead of sub2's. Other browsers do not have this issue. Upon reading http://nginx.org/en/docs/http/configuring_https_servers.html#name_based_https_servers I see that I need to do something like this
server {
listen 192.168.1.1:443 ssl;
server_name sub1.example.com;
ssl_certificate sub1.example.com.crt;
...
}
server {
listen 192.168.1.2:443 ssl;
server_name sub2.example.org;
ssl_certificate sub2.example.org.crt;
...
}
I am unsure how to actually set up or allocate the IPs. I tried just placing those IP from above into my nginx conf but it didn't work. After restarting nginx neither of my sites worked. When I try to load the website I get an error saying it couldn't connect to the server.
I have CentOS 6.5 and Nginx 1.6