云鎖界面中如果沒有自編譯Nginx的話,自編譯那里是灰色不可用的:則web防護不生效,但是系統防護是生效的。
也就意味著大部分功能是無法使用的,比如防CC,防SQL注入,防盜鏈,等功能無法生效。
Nginx自編譯的小白教程有很多,這里參考的:http://www.yibuxinxi.cn/3050.html
和大半年來的幾次一樣,雖然按上邊教程自編譯成功了,但是寶塔的Nginx里生成了大量錯誤日志,如果不能解決,用不多久服務器就扛不住了,錯誤日志都是下邊這樣的:

直到今天云鎖官方群管幫忙搞定:
在寶塔面板中找到服務器agent端 /usr/local/yunsuo_agent/FilterKernel.xml (vi修改)
注釋掉一行代碼,然后替換回去即可:
原始代碼:
<?xml version='1.0' encoding='utf-8'?> <Framework product_type="yunsuo" retcode="404"> <!--PlugIn dllpath="libs/libbypass.so" RunOn_Filter=".*" RunOn_Product=".*"/--> <PlugIn dllpath="libs/libperformanceMonitor.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libpeer.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libipFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libmethodFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libhttpkeyFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libccFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libmultidownloadFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libbackgroundFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libbrowseprotectFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libabnormalfileFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libantistealinglink.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libsqlProtection.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libfiledownloadProtection.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libresponsecontentFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libsensitiveFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> </Framework>
修改后代碼:
<?xml version='1.0' encoding='utf-8'?> <Framework product_type="yunsuo" retcode="404"> <!--PlugIn dllpath="libs/libbypass.so" RunOn_Filter=".*" RunOn_Product=".*"/--> <!--PlugIn dllpath="libs/libperformanceMonitor.so" RunOn_Filter=".*" RunOn_Product=".*"/--> <PlugIn dllpath="libs/libpeer.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libipFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libmethodFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libhttpkeyFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libccFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libmultidownloadFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libbackgroundFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libbrowseprotectFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libabnormalfileFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libantistealinglink.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libsqlProtection.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libfiledownloadProtection.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libresponsecontentFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> <PlugIn dllpath="libs/libsensitiveFilter.so" RunOn_Filter=".*" RunOn_Product=".*"/> </Framework>
最后重啟下Nginx和Php,終于沒有新的錯誤日志生成了!
PS:如果正常編譯后啟動Nginx出現如下錯誤:

Nginx配置規則錯誤:
nginx: the configuration file /www/server/nginx/conf/nginx.conf syntax is ok nginx: configuration file /www/server/nginx/conf/nginx.conf test failed
原因應該是之前有安裝過寶塔的付費插件過期未付費導致的,重新續費或卸載后Nginx即可正常啟動。
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
相關文章
暫無評論...