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

Arno0x0x nginx-forum at
Tue Aug 11 18:21:50 UTC 2015

Hi Maxim,

Thanks for your answer. Alas ! I check all config files in my /etc/nginx
directory, there's only one containing the server{} directive (for the sake
of it, I added the default_server to the listen directive, but it doesn't
change anything) :

pi at rpi /etc/nginx $ grep -r server *
fastcgi.conf:fastcgi_param  SERVER_PROTOCOL    $server_protocol;
fastcgi.conf:fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi.conf:fastcgi_param  SERVER_PORT        $server_port;
fastcgi.conf:fastcgi_param  SERVER_NAME        $server_name;

scgi_params:scgi_param  SERVER_PROTOCOL    $server_protocol;
scgi_params:scgi_param  SERVER_PORT        $server_port;
scgi_params:scgi_param  SERVER_NAME        $server_name;

sites-available/myfqdn:# server {
sites-available/myfqdn:server {
sites-available/myfqdn:	listen   443 ssl default_server; ## listen for ipv4;
this line is default and implied
sites-available/lmyfqdn:	#listen   [::]:80 default_server ipv6only=on; ##
listen for ipv6
sites-available/myfqdn:	server_name myfqdn;
sites-available/myfqdn:	ssl_prefer_server_ciphers on;
sites-available/myfqdn:	# redirect server error pages to the static page

uwsgi_params:uwsgi_param  SERVER_PROTOCOL    $server_protocol;
uwsgi_params:uwsgi_param  SERVER_PORT        $server_port;
uwsgi_params:uwsgi_param  SERVER_NAME        $server_name;


Could it be possible that nginx reads some other config files from another
location than /etc/nginx ?
What are my other options (some more debug info would be useful to check
where nginx gets its config from).

any idea ?


Posted at Nginx Forum:,260935,260942#msg-260942

More information about the nginx mailing list