“nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in example.com.nginx.ssl.conf“ è un avviso comune sui server Web con vecchie configurazioni nginx o VestaCP.
Soddisfare
nginx -t

acest warn appare più spesso sul server che ha VestaCP installato alcuni anni fa, quando nella configurazione nginx serviva una direttiva"ssl on
".
Come risolvere "ssl" è deprecata in Nginx / VestaCP
Metodo 1. Modifica file nginx.conf per il campo
Il modo più semplice è cancellare la direttiva "ssl on" con # per il dominio in cui è presente l'avviso nginx.
sudo nano /home/vestacpuser/conf/web/example.com.nginx.ssl.conf
# ssl on

Salva il file e poi eseguilo di nuovo nginx -t
. Errore nginx: [warn] the “ssl” directive is deprecated…” non sarà più presente.
nginx -t
Con questo metodo, l'errore non verrà risolto in modo permanente. I nuovi domini seguiranno il file di configurazione del pacchetto assegnato all'account on VestaCP.
Metodo 2. Modifica VestaCP Web Template per Nginx.
Prima di aggiungere a Utente in VestaCP, dobbiamo creare dei pacchetti. VestaCP Packages. Questi pacchetti contengono diverse configurazioni per diversi CMS o script. Web Template (Nginx), Backend Template (PHP-FPM), DNS Template (NAMED).
Quando aggiungiamo un campo un Utente VestaCP, verrà fornita la configurazione Nginx predefinita del dominio appena aggiunto Web Template (Nginx) selezionato per il pacchetto utenteacquis.

Prendiamo lo scenario in cui aggiungiamo Vesta Package Name: Stealth cu Web Template NGINX: wordpress2. Se il modello “wordpress2” contiene la direttiva “ssl on”, i nuovi domini aggiunti con questo modello avranno questa direttiva obsoleta nella configurazione. Quindi è meglio modificare Web Template in VestaCP. In modo che i nuovi domini aggiunti non ricevano più "ssl on" nella configurazione di Nginx.
Come modificare un Web Template VestaCP eliminare “ssl” directive is deprecated” ?
I template che scrivono i file di configurazione dei domini aggiunti si trovano in:
/usr/local/vesta/data/templates/web/nginx/php-fpm
Questi hanno due finali. .tpl
per domini senza SSL si.stpl
per domini con SSL attivato.
[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]#
Prendiamo lo scenario sopra, in cui abbiamo il modello "wordpress2.stpl". Modifichiamo questo file sul server web ed eliminiamo la riga con la direttiva "ssl on".
nano /usr/local/vesta/data/templates/web/nginx/php-fpm/wordpress2.stpl

Dopo aver rimosso la riga "ssl on" dal modello, salva il file. I seguenti domini che verranno aggiunti con questo modello non avranno più la direttiva obsoleta. "ssl" è deprecata, non apparirà durante il test di nginx.
Allo stesso modo è possibile modificare tutti i modelli web VestaCP oppure è possibile crearne di nuovi per includere configurazioni personalizzate di nginx e php-fpm.