返回列表 发帖

更新Nginx版本+Nginx版网站安全狗

笺注:这是在 LNMP一键安装包(lnmp_CentOS6.9) 的基础上进行的。


查看Nginx的版本:
[root@localhost ~]# nginx -v
nginx version: nginx/1.10.0

[root@localhost ~]# nginx -V
nginx version: nginx/1.10.0
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-ipv6 --with-http_sub_module





更新Nginx的版本:
图片1.png
2021-2-28 16:53



图片2.png
2021-2-28 16:53



默认会从公网下载软件包,但以防下载失败,最好先把新软件包放在 /root/lnmp1.3-full/src
You can get version number from http://nginx.org/en/download.html
图片3.png
2021-2-28 16:53

备注:如果安装成功,自动下载下来的软件包也会放在 /root/lnmp1.3-full/src


更新或取消更新:
图片4.png
2021-2-28 16:54



更新Nginx成功:
图片5.png
2021-2-28 16:54



再次查看Nginx的版本:
[root@localhost ~]# nginx -v
nginx version: nginx/1.12.2

[root@localhost ~]# nginx -V
nginx version: nginx/1.12.2
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-ipv6 --with-http_sub_module



Nginx/1.12.2可以安装网站安全狗,具体过程可参考:CentOS6安装服务器安全狗、Nginx版网站安全狗

安装后的效果,如下:
[root@localhost ~]# nginx -v
nginx version: nginx/1.12.2
safedog-nginx-waf version/2.4
developed by www.safedog.cn


[root@localhost ~]# nginx -V
nginx version: nginx/1.12.2
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-46)
built with OpenSSL 1.0.2k  26 Jan 2017
TLS SNI support enabled
configure arguments: --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-stream --with-mail --with-mail_ssl_module --with-ipv6 --with-http_auth_request_module --with-http_v2_module --with-pcre=../3th_lib/pcre-8.40 --with-openssl=../3th_lib/openssl-1.0.2k --with-cc-opt=-I../../../../Plugin_tag_before_yunyu/NginxSiteShield --with-ld-opt='-Wl,-rpath=/etc/safedog/libs/nginx -Wl,-rpath=/etc/safedog/libs/sdcommon -Wl,-rpath=/etc/safedog/libs/sdcc -Wl,-dynamic-linker=/etc/safedog/libs/sdcommon/ld-linux.so.2 -lstdc++ -lnginx_safedog_plugin -lWPCPlugin -lcurl -liconv -lSPModule -llog4cplus' _fuyun   
safedog-nginx-waf version/2.4
developed by www.safedog.cn




############
############

网站防护》漏洞防护:(要设置为 记录并拦截
图片6.png
2021-2-28 16:56



相关的配置文件:
[root@localhost ~]# cd /etc/safedog/nginx/conf/
[root@localhost conf]# cat WPCDefSql.conf
[SqlAttack]
ChkFullUrl=1
ChkSqlAttackStatus=1
ChkUrlLenStatus=1
Count=0
MaxUrlLen=2048
NeedSendInterceptPage=1 #记录并拦截;默认是0,记录不拦截
NeedSendInterceptPageSQLAttack=0
SendAlert=1
UpdateUrl=http://www.safedog.cn/upload/configFile/sqlRule.dat
WhitePathCount=0

注释:可以直接在配置文件中修改,自动生效的。


测试Nginx版网站安全狗的漏洞防护功能:
http://192.168.168.130/?order%20by
图片7.png
2021-2-28 16:57






相关文章:
Zabbix使用模板监控Nginx
CentOS8_lnmp1.7_更改Nginx的版本





#################################
#################################
亲,学习研究也要劳逸结合哦,来我微店逛逛,买点东西好好犒劳犒劳自己和家人吧^_^^_^

休闲零食传承世家风干牛肉干 手撕风干牛肉四川特产【非偏远地区满79包邮】
niur.png
2019-10-4 16:10


长虹办公室鼠标加热保暖桌垫毯电脑暖手桌面发热板电热台板写字台
dianzi.png
2019-10-4 16:10


飞科电熨斗蒸汽家用熨斗家用电烫斗蒸气手持迷你电熨斗FI9308包邮
weidou.png
2019-10-4 16:10


新款男长款拉链潮男士钱包男士手拿包 商务皮夹钱夹-JKPJ1806
nanbao.png
2019-10-4 16:10


韩版定型斜挎单肩手提包SN-两层活动女包8874
nvbao.png
2019-10-4 16:10

返回列表