Welcome! Log In Create A New Profile

Advanced

SSL on/off on same port and IP

Ingo Lafrenz
June 23, 2015 10:52AM
Hi,

consider the following very simple nginx config:
http {
server {
listen 127.0.0.1:123;
server_name abc;
}
server {
listen 127.0.0.1:123 ssl;
server_name xyz;
ssl_certificate...;
}
}

In words:
I instruct nginx to listen on the same port and IP, one time without
ssl, one time with ssl. IMHO this is a broken config, however nginx
accepts it.

What would you say? Should nginx reject such a config? Right now you
only get an error at request time.

It gets even worse, if the 2nd server is configured with the ssl
directive instead of "listen ssl":
server {
listen 127.0.0.1:123;
server_name xyz;
ssl on;
ssl_certificate...;
}

In that case you don't even see an error in the logs anymore and clients
can't connect via https anymore.

Cheers, Ingo =;->

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

SSL on/off on same port and IP

Ingo Lafrenz June 23, 2015 10:52AM

Re: SSL on/off on same port and IP

Maxim Dounin July 04, 2015 02:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 305
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready