nginx the "ssl" directive is deprecated, use the "listen ... ssl"

MacosSslNginxConfigurationHomebrew

Macos Problem Overview


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?

Macos Solutions


Solution 1 - Macos

Edit your listen statement from:

listen 443;

to

listen 443 ssl;

and comment out or delete :

# ssl on;   

then check nginx -t again.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsambuaView Question on Stackoverflow
Solution 1 - MacosThanh Nguyen VanView Answer on Stackoverflow