Is there a Bug in Nginx HttpSslModule ?

. varia at e-healthexpert.org
Wed Oct 6 12:46:19 MSD 2010


while using Ubuntu 10.04, nginx 0.8.50-0ubuntu1
nginx -V
	nginx version: nginx/0.8.50
	TLS SNI support enabled
	configure arguments: --conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid
--lock-path=/var/lock/nginx.lock
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-http_ssl_module
--without-http_limit_req_module --without-mail_pop3_module
--without-mail_smtp_module --without-mail_imap_module
--without-http_uwsgi_module --without-http_scgi_module
--without-http-cache

cat /etc/hosts
	127.0.0.1 localhost.localdomain localhost pma.example.com
example.com

As at http://wiki.nginx.org/HttpSslModule it is said that "Since Nginx
version 0.7.14 the preferred way of enabling SSL is by using the `ssl`
parameter of the `listen` directive", 
I have found 2 working configurations and a 3rd one that should, but
doesn't work.

# VERSION 1: this config is good
server {
	listen example.com:443 default_server;
	server_name example.com;
	ssl  on;
	...
server {
	listen pma.example.com:443;
	server_name pma.example.com;
	ssl  on;
	...

# VERSION 2: this config is good
server {
	listen example.com:443 default_server ssl;
	server_name example.com;
	#ssl  on;
	...
server {
	listen pma.example.com:443;
	server_name pma.example.com;
	ssl  on;
	...

# VERSION 3: this config gives an ERROR
server {
	listen example.com:443 default_server ssl;
	server_name example.com;
	#ssl  on;
	...
server {
	listen pma.example.com:443 ssl;
	server_name pma.example.com;
	#ssl  on;
	...

sudo nginx -s reload
[emerg]: a duplicate listen options for 127.0.0.1:443
in /etc/nginx/sites-enabled/spma.com:10



More information about the nginx mailing list