๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
devOps/Nginx

[ ์—”์ง„์—‘์Šค(Nginx) ] [ warn ] the "ssl" directive is deprecated, use the listen ...

by YWTechIT 2022. 3. 11.
728x90

๐Ÿ“ the "ssl" directive is deprecated, use the listen ...

Docker๋ฅผ ์ด์šฉํ•ด ๋ฐฐํฌ ํ™˜๊ฒฝ์—์„œ nginx.conf๋ฅผ ์„ธํŒ…ํ•˜๊ณ  ์‹คํ–‰์„ ํ•˜๋Š”๋ฐ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฒฝ๊ณ ๋ฌธ์ด ๋–ด๋‹ค.

728x90
nginx_1    | 2022/03/10 22:11:52 [warn] 1#1: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/nginx.conf:35

nginx_1    | nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/nginx.conf:35

Error๋Š” ์•„๋‹ˆ๊ธฐ์— ์ •์ƒ์ ์œผ๋กœ ์‹คํ–‰์€ ๋˜์ง€๋งŒ, ์ž๊พธ ๊ฑฐ์Šฌ๋ ค์„œ ํ•ด๊ฒฐํ•˜๊ณ  ์‹ถ์—ˆ๋‹ค. ๊ฒฐ๋ก ์ ์œผ๋กœ Nginx์˜ ๋ฒ„์ „์ด 1.15.0 ์ด์ƒ์ด๋ผ๋ฉด ssl on; ๋˜๋Š” ssl off; ์ฝ”๋“œ๋ฅผ ์ œ๊ฑฐํ•˜๊ณ  listen์— ssl์„ ๋ถ™์—ฌ์ค€๋‹ค.

# before
listen 443;
ssl on;

# after
listen 443 ssl;

reference

  1. http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl
  2. https://stackoverflow.com/questions/51703109/nginx-the-ssl-directive-is-deprecated-use-the-listen-ssl
  3. https://robiokidenis.medium.com/how-to-fix-nginx-warn-the-ssl-directive-is-deprecated-use-the-listen-ssl-6dfaa2356abc
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€