mirror of
https://github.com/myvesta/vesta
synced 2025-07-06 04:51:54 -07:00
Update v-add-firewall-ban: nginx deny rules conf
This commit is contained in:
parent
015b3c4571
commit
6a35d14f0c
1 changed files with 4 additions and 2 deletions
|
@ -74,8 +74,10 @@ chmod 660 $conf
|
|||
|
||||
# nginx deny rules conf
|
||||
if [ "$chain" = "WEB" ] && [ -f "/etc/nginx/conf.d/block.conf" ]; then
|
||||
if ! grep -q "deny $ip;" /etc/nginx/conf.d/block.conf; then
|
||||
echo "deny $ip;" >> /etc/nginx/conf.d/block.conf
|
||||
systemctl reload nginx
|
||||
fi
|
||||
fi
|
||||
|
||||
#----------------------------------------------------------#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue