nginx를 수정하는 방법: [warn] "ssl"지시문은 더 이상 사용되지 않습니다(Nginx / VestaCP)

nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in example.com.nginx.ssl.conf 오래된 nginx 구성이 있는 웹 서버에 대한 일반적인 경고입니다. VestaCP.

nginx -t
어떻게 고치는 지 "ssl"지시문은 더 이상 사용되지 않습니다.
SSL 지령 error in NGINX.conf

이 warn 가 있는 서버에 가장 자주 나타납니다. VestaCP 구성에 있을 때 몇 년 전에 설치 Nginx에 지시가 필요했다"ssl on".

어떻게 고치는 지 "ssl"지시문은 더 이상 사용되지 않습니다. Nginx에서 / VestaCP

방법 1. 파일 편집 nginx.conf 필드를 위해

가장 편리한 것은 # 지시문 "으로 취소하는 것입니다.ssl nginx 경고가 있는 도메인에 대해 "켜기.

sudo nano /home/vestacpuser/conf/web/example.com.nginx.ssl.conf
# ssl on
사용 안 함 SSL NGINX의 지시문
사용 안 함 SSL NGINX의 지시문

파일을 저장하고 다시 실행 nginx -t. 오류 nginx: [warn] the “ssl” directive is deprecated…” 더 이상 존재하지 않습니다.

nginx -t

이 방법으로는 오류가 영구적으로 해결되지 않습니다. 새 도메인은 계정에 할당된 패키지의 구성 파일을 따릅니다. VestaCP.

방법 2. 편집 VestaCP Web Template Nginx용.

추가하기 전에 사용자 in VestaCP, 패키지를 만들어야 합니다. VestaCP Packages. 이러한 패키지에는 다양한 CMS 또는 스크립트에 대한 여러 구성이 포함되어 있습니다. Web Template (Nginx), Backend Template (PHP-FPM), DNS Template (NAMED).

추가할 때 지역사용자 VestaCP, Nginx 구성 default 추가된 새 도메인의 Web Template (Nginx에) 선택됨 사용자 패키지의 경우acquis.

VestaCP 웹 템플릿 Nginx
VestaCP 웹 템플릿 Nginx

우리는 우리가 추가하는 시나리오를 취합니다 Vesta Package Name: Stealth cu Web Template NGINX: wordpress2. 템플릿의 경우 “wordpress2” 지시문 포함 “ssl on”, 이 템플릿으로 추가된 새 도메인에는 구성에 이 오래된 지시문이 있습니다. 그래서 최고야 수정하다 Web Template in VestaCP. 따라서 추가된 새 도메인은 더 이상 "ssl Nginx 구성에서 "에.

편집 방법 Web Template VestaCP 제거하기 ssl” directive is deprecated?

추가된 도메인의 구성 파일을 작성하는 템플릿은 다음 위치에 있습니다.

/usr/local/vesta/data/templates/web/nginx/php-fpm

이 두 가지 엔딩이 있습니다. .tpl없는 도메인 SSL 그리고 .stpl도메인 SSL 활성화.

[root@north php-fpm]# pwd
/usr/local/vesta/data/templates/web/nginx/php-fpm
[root@north php-fpm]# ls -all
total 224
drwxr-xr-x 2 root root 4096 Jul  3 23:51 .
drwxr-xr-x 3 root root 4096 Apr 25  2017 ..
-rwxr-xr-x 1 root root 1737 Feb 27 07:12 cms_made_simple.stpl
-rwxr-xr-x 1 root root 1638 Feb 27 07:12 cms_made_simple.tpl
-rwxr-xr-x 1 root root 1770 Feb 27 07:12 codeigniter2.stpl
-rwxr-xr-x 1 root root 1671 Feb 27 07:12 codeigniter2.tpl
-rwxr-xr-x 1 root root 6528 Feb 27 07:12 datalife_engine.stpl
-rwxr-xr-x 1 root root 6429 Feb 27 07:12 datalife_engine.tpl
-rwxr-xr-x 1 root root 1601 Feb 27 07:12 default.stpl
-rwxr-xr-x 1 root root 1502 Feb 27 07:12 default.tpl
-rwxr-xr-x 1 root root 2176 Feb 27 07:12 dokuwiki.stpl
-rwxr-xr-x 1 root root 2076 Feb 27 07:12 dokuwiki.tpl
-rwxr-xr-x 1 root root 2280 Feb 27 07:12 drupal6.stpl
-rwxr-xr-x 1 root root 2177 Feb 27 07:12 drupal6.tpl
-rwxr-xr-x 1 root root 2508 Feb 27 07:12 drupal8.stpl
-rwxr-xr-x 1 root root 2415 Feb 27 07:12 drupal8.tpl
-rwxr-xr-x 1 root root 1949 Feb 27 07:12 joomla.stpl
-rwxr-xr-x 1 root root 1850 Feb 27 07:12 joomla.tpl
-rwxr-xr-x 1 root root 1667 Feb 27 07:12 laravel.stpl
-rwxr-xr-x 1 root root 1562 Feb 27 07:12 laravel.tpl
-rwxr-xr-x 1 root root 5590 Feb 27 07:12 magento.stpl
-rwxr-xr-x 1 root root 5488 Feb 27 07:12 magento.tpl
-rwxr-xr-x 1 root root 1928 Feb 27 07:12 modx.stpl
-rwxr-xr-x 1 root root 1828 Feb 27 07:12 modx.tpl
-rwxr-xr-x 1 root root 2446 Feb 27 07:12 moodle.stpl
-rwxr-xr-x 1 root root 2411 Feb 27 07:12 moodle.tpl
-rwxr-xr-x 1 root root 1303 Feb 27 07:12 no-php.stpl
-rwxr-xr-x 1 root root 1204 Feb 27 07:12 no-php.tpl
-rwxr-xr-x 1 root root 1990 Feb 27 07:12 odoo.stpl
-rwxr-xr-x 1 root root 1891 Feb 27 07:12 odoo.tpl
-rwxr-xr-x 1 root root 1724 Feb 27 07:12 opencart.stpl
-rwxr-xr-x 1 root root 1624 Feb 27 07:12 opencart.tpl
-rwxr-xr-x 1 root root 2796 Feb 27 07:12 owncloud.stpl
-rwxr-xr-x 1 root root 2701 Feb 27 07:12 owncloud.tpl
-rwxr-xr-x 1 root root 2081 Feb 27 07:12 piwik.stpl
-rwxr-xr-x 1 root root 1982 Feb 27 07:12 piwik.tpl
-rw-r--r-- 1 root root  189 Feb 27 07:12 proxy_ip.tpl
-rwxr-xr-x 1 root root 2124 Feb 27 07:12 pyrocms.stpl
-rwxr-xr-x 1 root root 2021 Feb 27 07:12 pyrocms.tpl
-rwxr-xr-x 1 root root 2478 Feb 27 07:12 sendy.stpl
-rwxr-xr-x 1 root root 2390 Feb 27 07:12 sendy.tpl
-rwxr-xr-x 1 root root 1952 Feb 27 07:12 wordpress2_rewrite.stpl
-rwxr-xr-x 1 root root 1859 Feb 27 07:12 wordpress2_rewrite.tpl
-rwxr-xr-x 1 root root 1842 Feb 27 07:12 wordpress2.stpl
-rwxr-xr-x 1 root root 1743 Feb 27 07:12 wordpress2.tpl
-rwxr-xr-x 1 root root 2701 Feb 27 07:12 wordpress2_wp_super_cache.stpl
-rwxr-xr-x 1 root root 2596 Feb 27 07:12 wordpress2_wp_super_cache.tpl
-rwxr-xr-x 1 root root 1601 Feb 27 07:12 wordpress.stpl
-rwxr-xr-x 1 root root 1502 Feb 27 07:12 wordpress.tpl
[root@north php-fpm]# 

우리는 템플릿 "wordpress2.stpl ". 우리는 웹 서버에서 이 파일을 편집하고 지시문 "ssl 의 위에".

nano /usr/local/vesta/data/templates/web/nginx/php-fpm/wordpress2.stpl
제거 SSL Nginx의 ON 지시문 /. VestaCP
제거 SSL Nginx의 ON 지시문 / VestaCP

라인을 제거한 후 "ssl 에 "템플릿에서 파일을 저장합니다. 이 템플릿과 함께 추가될 다음 영역에는 더 이상 오래된 지시문이 없습니다. "ssl"지시문은 더 이상 사용되지 않습니다., nginx를 테스트할 때 나타나지 않습니다.

같은 방식으로 모든 웹 템플릿을 수정할 수 있습니다. VestaCP 또는 사용자 지정 nginx 및 php-fpm 구성을 포함하도록 새 항목을 만들 수 있습니다.

기술에 대한 열정, 나는 기쁨으로 글을 씁니다. StealthSettings2006년부터 .com을 운영하고 있습니다. 저는 운영 체제 분야에서 폭넓은 경험을 갖고 있습니다. macOS, Windows 과 Linux, 프로그래밍 언어 및 블로그 플랫폼(WordPress) 및 온라인 상점의 경우(WooCommerce, 마젠토, 프레스타샵).

방법 » Linux » nginx를 수정하는 방법: [warn] "ssl"지시문은 더 이상 사용되지 않습니다(Nginx / VestaCP)
코멘트 남김