?。。∑渌姹痉椒ㄒ恢?,除第6步有區(qū)別其他命令均一致!??!
寶塔面板使用nginx安裝云鎖開啟web防護(hù)后網(wǎng)站打不開是因?yàn)樾枰獙?duì)nginx進(jìn)行自編譯,加入云鎖防護(hù)模式,以代替web防護(hù)。web防護(hù)功能與nginx自編譯后功能一樣。
# ps -elf | grep nginx
# cd /www/server/nginx/sbin/
# cp nginx nginx.bak
# cd ~
# wget?https://codeload.github.com/yunsuo-open/nginx-plugin/zip/master?-O nginx-plugin-master.zip
# unzip nginx-plugin-master.zip
# cd nginx-plugin-master/
# pwd
# cd ~
# /www/server/nginx/sbin/nginx -V
備注:將./configure arguents:之后的內(nèi)容復(fù)制到記事本備用
備注:編譯內(nèi)容為(./configure 上一步記事本中的備用內(nèi)容 --add-module=/root/nginx-plugin-master)
# cd?/www/server/nginx/src
如下列代碼(下列代碼請(qǐng)勿復(fù)制直接使用,根據(jù)你服務(wù)器回顯的內(nèi)容為準(zhǔn)):
# ./configure --user=www --group=www --prefix=/www/server/nginx --with-
openssl=/www/server/nginx/src/openssl --add-module=/www/server/nginx/src/ngx_devel_kit --add-
module=/www/server/nginx/src/lua_nginx_module --add-module=/www/server/nginx/src/ngx_cache_purge
--with-http_stub_status_module --with-http_ssl_module --with-http_image_filter_module --with-
http_v2_module --with-http_gzip_static_module --with-http_gunzip_module --with-stream --with-
stream_ssl_module --with-ipv6 --with-http_sub_module --with-http_flv_module --with-
http_addition_module --with-http_realip_module --with-http_mp4_module --with-ld-opt=-Wl,-E --add-
module=/root/nginx-plugin-master
以上操作,切記查看路徑是否正確 多數(shù)編譯后出問題就出現(xiàn)在這個(gè)地方:/www/server/nginx/src(此路徑)
ps:nginx版本號(hào)區(qū)分(說白了現(xiàn)在用的版本都是大于1.8的,具體怎么計(jì)算,算第一個(gè)小數(shù)點(diǎn)后面的數(shù)字比大小,如下)
版本號(hào):Nginx 1.19.2 大于 Nginx 1.8.0 ↑(對(duì)比的是版本號(hào)中間的那一位數(shù)字,例如這次編譯的版本19大于8,這再不明白的話就真懶得講了?。?!)
版本號(hào):Nginx 1.18.0 大于 Nginx 1.8.0 ↑
版本號(hào):Nginx 1.16.0 大于 Nginx 1.8.0 ↑
版本號(hào):Nginx 1.14.0 大于 Nginx 1.8.0 ↑
版本號(hào):Nginx 1.12.0 大于 Nginx 1.8.0 ↑
版本號(hào):1.8.0 ↓
(如果是你用的這幾個(gè)對(duì)比的版本號(hào),直接加 -DHIGHERTHAN8 即可)很多Q群的朋友都在說不用加,但是Nginx的版本號(hào)對(duì)比方面,對(duì)比數(shù)字大小并非是靠前的數(shù)字。
# vi objs/Makefile
備注:按Insert后找到-Werror -g 添加 -DHIGHERTHAN8 ,添加之后按ESC:wq
以上操作,切記查看路徑是否正確 多數(shù)編譯后出問題就出現(xiàn)在這個(gè)地方:/www/server/nginx/src(此路徑)
# make
# rm -rf /www/server/nginx/sbin/nginx
# cp objs/nginx /www/server/nginx/sbin/
# service nginx restart
9.到此通過PC端連接到服務(wù)器端,在PC端的界面上刷新后可以看到已識(shí)別nginx插件(由灰色變?yōu)榫G色)。ps:如之前開啟了Web防護(hù)關(guān)閉后可現(xiàn)實(shí)自編譯!
http://域名+/?order%20by
瀏覽器執(zhí)行
Site building experience
Website operation
Website design
Website optimization
Marketing Planning
Network popularization
Electronic Commerce
Media Coverage
Common problem
Technical note