كيفية إصلاح 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 يظهر غالبًا على الخادم الذي يحتوي على VestaCP مثبتة قبل بضع سنوات ، عندما تكون في التكوين NGINX كانت هناك حاجة إلى التوجيه "ssl on".

كيفية الإصلاح "ssl"التوجيه متوقف في Nginx / VestaCP

الطريقة الأولى: تحرير الملف nginx.conf للميدان

من الأفضل لنا الإلغاء باستخدام التوجيه # "ssl on "للمجال الذي لدينا فيه تحذير nginx.

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.

الطريقة الثانية. تحرير VestaCP Web Template لـ Nginx.

قبل أن نضيف أ المستخدم in VestaCP، نحتاج إلى إنشاء حزم. VestaCP Packages. تحتوي هذه الحزم على العديد من التكوينات لأنظمة إدارة المحتوى أو البرامج النصية المختلفة. Web Template (Nginx), Backend Template (PHP-FPM), DNS Template (NAMED).

عندما نضيف ملف منطقة ل المستخدم VestaCP، تكوين Nginx default من المجال الجديد الذي تمت إضافته سيتم تقديمه بواسطة Web Template (إنجن إكس) المحدد لحزمة المستخدمالموقع.

VestaCP قالب الويب Nginx
VestaCP قالب الويب Nginx

نأخذ السيناريو الذي نضيف فيه Vesta Package Name: Stealth cu Web Template NGINX: wordpress2. إذا كان النموذج “wordpress2” يحتوي على توجيه “ssl on”، المجالات الجديدة المضافة مع هذا القالب سيكون لها هذا التوجيه القديم في التكوين. لذا فهو الأفضل للتعديل Web Template in VestaCP. لذلك لن تتلقى المجالات المضافة الجديدة "ssl on "في تكوين 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 on "من النموذج ، احفظ الملف. المناطق التالية التي ستتم إضافتها مع هذا القالب لن يكون لها توجيه قديم بعد الآن. "ssl"التوجيه متوقف, لن يظهر عند اختبار nginx.

بنفس الطريقة يمكن تعديل جميع قوالب الويب VestaCP أو جديدة لتضمين تكوينات nginx و php-fpm مخصصة.

شغوفة بالتكنولوجيا ، أكتب بسرور StealthSettings.com منذ عام 2006. لدي خبرة واسعة في أنظمة التشغيل: macOS, Windows سي Linuxبل أيضًا في لغات البرمجة ومنصات التدوين (WordPress) وللمتاجر عبر الإنترنت (WooCommerce، ماجنتو، بريستاشوب).

كيف » Linux » كيفية إصلاح nginx: [warn] ال "ssl"التوجيه مهمل (Nginx / VestaCP)
اترك تعليق