“nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in example.com.nginx.ssl.conf“ är en vanlig varning på webbservrar med gamla nginx-konfigurationer eller VestaCP.
nginx -t

detta warn visas oftast på servern som har VestaCP installerades för några år sedan, när den var i konfigurationen nginx direktiv behövdes"ssl on
".
Koppprins
Hur man fixar "ssl”Direktivet är utfasat i Nginx / VestaCP
Metod 1. Redigera fil nginx.conf för fältet
Det bekvämaste är för oss att avbryta med #-direktivet "ssl på ”för domänen där vi har nginx warn.
sudo nano /home/vestacpuser/conf/web/example.com.nginx.ssl.conf
# ssl on

Spara filen och kör den sedan igen nginx -t
. Fel nginx: [warn] the “ssl” directive is deprecated…” den kommer inte längre att finnas.
nginx -t
Med den här metoden kommer felet inte att lösas permanent. De nya domänerna kommer att följa konfigurationsfilen för paketet som tilldelats kontot på VestaCP.
Metod 2. Redigera VestaCP Web Template för Nginx.
Innan vi lägger till en användare in VestaCP, måste vi skapa paket. VestaCP Packages. Dessa paket innehåller flera konfigurationer för olika CMS eller skript. Web Template (Nginx), Backend Template (PHP-FPM), DNS Template (NAMED).
När vi lägger till en fält på användare VestaCP, Nginx-konfiguration default av den nya domänen som läggs till kommer att ges av Web Template (nginx) valt för användarpaketetregelverk.

Vi tar scenariot som vi lägger till Vesta Package Name: Stealth cu Web Template NGINX: wordpress2. Om mallen “wordpress2” innehåller direktiv “ssl on”, kommer de nya domänerna som läggs till med denna mall att ha detta föråldrade direktiv i konfiguration. Så det är bäst att modifiera Web Template in VestaCP. Så de nya tillagda domänerna kommer inte längre att ta emot "ssl på ”i Nginx-konfigurationen.
Hur man redigerar en Web Template VestaCP att eliminera “ssl” directive is deprecated” ?
Mallarna som skriver konfigurationsfilerna för de tillagda domänerna finns i:
/usr/local/vesta/data/templates/web/nginx/php-fpm
Dessa har två slut. .tpl
för domäner utan SSL och .stpl
för domäner med SSL aktiverad.
[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]#
Vi tar ovanstående scenario, där vi har mallen "wordpress2.stpl ”. Vi redigerar den här filen på webbservern och tar bort raden med direktivet "ssl på".
nano /usr/local/vesta/data/templates/web/nginx/php-fpm/wordpress2.stpl

Efter att ha tagit bort linjen "ssl på ”från mallen, spara filen. Följande områden som kommer att läggas till med denna mall kommer inte längre att ha ett föråldrat direktiv. "ssl”Direktivet är utfasat, det visas inte när du testar nginx.
På samma sätt kan alla webbmallar modifieras VestaCP eller nya kan skapas för att inkludera anpassade nginx- och php-fpm-konfigurationer.