Welcome! Log In Create A New Profile

Advanced

Re: Multiple server definitions with SSL

Maxim Dounin
July 26, 2011 02:14PM
Hello!

On Tue, Jul 26, 2011 at 05:44:32PM +0100, Ben Lancaster wrote:

> We recently had a problem where we created a new server
> configuration (for http with and without ssl on ports 443 and 80
> respectively) on a shared web server which also included a
> number of other nginx servers similarly configured.
>
> Unfortunately, we neglected to include the ssl_certificate and
> ssl_certificate_key directives for the new server. So, the
> configurations looked something like this:

[...]

> Is this expected behaviour? Should nginx -t not have flagged
> that there was no default ssl_certificate(_key) directives
> defined?

Probably yes, but this isn't currently done when you define
ssl servers with

listen ... ssl;

Using "ssl on;" in separate server definition will give you
expected config test error.

> Why was the first server affected?

Most likely because you used something like "include
/path/to/files/*;" to include individual config files, and new
server you added was picked up first and become default one.

Maxim Dounin

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

Multiple server definitions with SSL

Ben Lancaster July 26, 2011 12:46PM

Re: Multiple server definitions with SSL

Maxim Dounin July 26, 2011 02:14PM

Re: Multiple server definitions with SSL

Igor Sysoev July 28, 2011 02:56AM

Re: Multiple server definitions with SSL

Maxim Dounin July 28, 2011 05:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 164
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready