כיצד לתקן 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 מופיע לרוב ב-server שיש להם VestaCP הותקן לפני כמה שנים, כשהם בתצורה nginx היה צורך בהנחיה"ssl on

איך לתקן "ssl"ההנחיה הוצאה משימוש ב-Nginx / VestaCP

שיטה 1. ערוך קובץ nginx.conf עבור השטח

הכי נוח לנו לבטל עם ההנחיה #"ssl על "עבור התחום שבו יש לנו nginx warn.

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) נבחר עבור חבילת המשתמשמה שהושג.

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 הנחיית ON ב-Nginx /. VestaCP
להסיר SSL הנחיית ON ב-Nginx / VestaCP

לאחר הסרת הקו"ssl על "מהתבנית, שמור את הקובץ. לאזורים הבאים שיתווספו עם תבנית זו לא תהיה עוד הנחיה מיושנת. "ssl"ההנחיה הוצאה משימוש, לא יופיע בעת בדיקת nginx.

באותו אופן ניתן לשנות את כל תבניות האינטרנט VestaCP או ניתן ליצור חדשים כדי לכלול תצורות nginx ו-php-fpm מותאמות אישית.

כחובב טכנולוגיה, אני כותב בשמחה ב- StealthSettings.com מאז 2006. יש לי ניסיון עשיר במערכות הפעלה: macOS, Windows, ו- Linux, וגם בשפות תכנות ופלטפורמות בלוגינג (WordPress) ולסוחרת אלקטרונית (WooCommerce, Magento, PrestaShop).

איך » Linux » כיצד לתקן nginx: [warn] ה "ssl"ההנחיה הוצאה משימוש (Nginx / VestaCP)
השאירו תגובה