“nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in example.com.nginx.ssl.conf“ 是具有舊 nginx 配置的 Web 服務器上的常見警報或 VestaCP.
庫普林斯
nginx -t

這 warn 最常出現在具有 VestaCP 幾年前安裝的,在配置的時候 nginx的 需要指令“ssl on
“。
怎麼修 “ssl”指令已棄用 在 Nginx / VestaCP
方法一、編輯文件 nginx.conf 對於領域
最簡單的方法是使用 # 取消 nginx 警告域的「ssl on」指令。
sudo nano /home/vestacpuser/conf/web/example.com.nginx.ssl.conf
# ssl on

保存文件,然後再次運行 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 配置將由以下給出 Web Template (Nginx的) 選擇 對於用戶包acquis。

我們採用我們添加的場景 Vesta Package Name: Stealth cu Web Template NGINX: wordpress2. 如果模板 “wordpress2” 包含指令 “ssl on”,使用此模板添加的新域將在配置中包含此過時的指令。 所以最好 修改 Web Template in VestaCP。這樣新增的新網域將不再在 Nginx 設定中收到「ssl on」。
如何編輯一個 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”模板。我們在 Web 伺服器上編輯此檔案並刪除帶有「ssl on」指令的行。
nano /usr/local/vesta/data/templates/web/nginx/php-fpm/wordpress2.stpl

從模板中刪除“ssl on”行後,儲存檔案。將使用此範本新增的下列網域將不再具有過時的指令。 」ssl”指令已棄用, 測試nginx時不會出現。
以同樣的方式可以修改所有 Web 模板 VestaCP 或者可以創建新的以包含自定義 nginx 和 php-fpm 配置。