147

After NGINX upgrade to v1.15.2 starts getting the warning.

nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /usr/local/etc/nginx/sites-enabled/confid-file-name:8

Where the 8th line is ssl on;

how I can solve this?

rubo77
  • 19,527
  • 31
  • 134
  • 226
sambua
  • 2,274
  • 3
  • 22
  • 20

1 Answers1

304

Edit your listen statement from:

listen 443;

to

listen 443 ssl;

and comment out or delete :

# ssl on;   

then check nginx -t again.

phoenix
  • 7,988
  • 6
  • 39
  • 45
Thanh Nguyen Van
  • 10,292
  • 6
  • 35
  • 53
  • 17
    reloading nginx config with `service nginx reload` or other commands depending on your operating system might be necessary – Sliq May 01 '19 at 18:11
  • search for missing `ssl` in all your config fies with `grep "443;" /etc/nginx/sites-available/* ` – rubo77 Feb 19 '22 at 21:47