Why can't I use the "ssl" modified on more than one listen statement?
portante
nginx-forum at nginx.us
Tue Sep 21 19:39:46 MSD 2010
Hi,
The following is an example of how we would like to run our
configuration.
[code]
ssl_certificate common.crt;
ssl_certificate_key common.key;
server {
listen 80;
server_name www.nginx.org;
...
}
server {
listen 443 default ssl;
server_name secure.nginx.org;
...
}
server {
listen 80;
listen 443 ssl;
server_name images.nginx.org;
include images.location;
}
[/code]
We encounter the following error trying to install the configuration:
[code]
[emerg]: a duplicate listen options for 0.0.0.0:443 in
/usr/local/etc/nginx/projects/proj.conf:19
[/code]
All of the server names are CNAMEs of one IP address.
If I do the following, it works:
[code]
ssl_certificate common.crt;
ssl_certificate_key common.key;
server {
listen 80;
server_name www.nginx.org;
...
}
server {
listen 443 default ssl;
server_name secure.nginx.org;
...
}
server {
listen 80;
server_name images.nginx.org;
include images.location;
}
server {
listen 443;
ssl on;
server_name images.nginx.org;
include images.location;
}
[/code]
Why can I not specify like the first example above?
Thanks,
-peter
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,132621,132621#msg-132621
More information about the nginx
mailing list