“nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in example.com.nginx.ssl.conf“ 它是具有旧NGINX或VESTACP配置的Web服务器上的常见警报。
内容
nginx -t

该警告最常出现在几年前安装了VestACP的Seververs上 nginx 需要该指令 “ssl on“。
如何修复 “SSL” 指令被弃用 在nginx / vestacp中
方法1。文件编辑nginx.conf域
最方便的是用#指令取消我们 “SSL打开” 对于该领域,我们有Ningin警告。
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 对于ninx。
在我们添加一个之前 用户 在 维克斯,我们必须创建软件包。 VestaCP Packages。这些软件包包含用于不同CM或经文的多个配置。 Web Template (Nginx), Backend Template (PHP-FPM), DNS Template (NAMED).
当我们添加一个 场地 一个 用户vestacp,新添加域的Ningin默认配置将由 Web Template ((nginx)选择 对于用户包到。

我们采用的情况我们添加 Vesta Package Name: Stealth 铜 Web Template NGINX: wordpress2。如果模板 “wordpress2” 包含指令 “ssl on”,使用此模板添加的新字段将在配置中具有过时的指令。最好的是 SA修改 Web Template 在 维克斯。因此,添加的新区域停止接收 “SSL打开” 在Ninx配置中。
当编辑联合国时 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打开”。
nano /usr/local/vesta/data/templates/web/nginx/php-fpm/wordpress2.stpl
删除线路后 “SSL打开” 从模板中,我们保存文件。此模板将添加的以下区域将不再具有出色的指令。 “SSL” 指令被弃用,,,, 当我们测试Ningx时,它不会出现。
以同样的方式,可以修改所有VestACP Web模板,也可以创建新的Web模板,其中包括个性化的NGINX和PHP-FPM配置。