Welcome! Log In Create A New Profile

Advanced

Re: Nginx serving self-signed cert instead of the one defined in conf

Maxim Dounin
August 11, 2015 02:02PM
Hello!

On Tue, Aug 11, 2015 at 01:27:23PM -0400, Arno0x0x wrote:

> Hello,
>
> I'm facing a strange issue since I upgraded from Nginx 1.6.2 to 1.8.0. My
> configuration files have been kept identicals, as well as my official SSL
> certificates.
>
> The problem is Nginx keeps on serving a self-signed certificate (dunno where
> it takes it from) instead of my proper certificates that I defined in the
> config file. Here's the server section SSL config bits :
>
> ------------------------------------------------------------------------------------
> server {
> listen 443 ssl; ## listen for ipv4; this line is default and implied
> #listen [::]:80 default_server ipv6only=on; ## listen for ipv6
>
> server_name my_fqdn;
>
> ssl_certificate /etc/nginx/ssl/gandi/my_fqdn.crt;
> ssl_certificate_key /etc/nginx/ssl/gandi/my_fqdn.key;
> ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
> ssl_ciphers 'AES256+EECDH:AES256+EDH';
> ssl_prefer_server_ciphers on;
> ssl_session_cache shared:SSL:10m;
>
> ...
> ------------------------------------------------------------------------------------
>
> This configuration works fine on my other server with nginx 1.6.2.

The configuration snippet you've provided is just a snippet for a
single server block, not a full configuration. Depending on other
server{} blocks it may or may not work.

Most notably, the "listen" directive doesn't have "default_server"
parameter. That is, if there is another server{} block defined
for the same listening socket in the configuration, it may be used
as a default one instead (assuming that server is defined first).

Try looking into your full configuration, nginx.conf. When
questions arise, it usally means that the configuration contains
something like "include /path/to/files/*.conf;" - and you have to
examine all files matching a given mask.

--
Maxim Dounin
http://nginx.org/

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

Nginx serving self-signed cert instead of the one defined in conf

Arno0x0x August 11, 2015 01:27PM

Re: Nginx serving self-signed cert instead of the one defined in conf

Maxim Dounin August 11, 2015 02:02PM

Re: Nginx serving self-signed cert instead of the one defined in conf

Arno0x0x August 11, 2015 02:21PM

Re: Nginx serving self-signed cert instead of the one defined in conf

Arno0x0x August 12, 2015 05:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 243
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