mitchellkrogza / nginx-ultimate-bad-bot-blocker

Nginx Block Bad Bots, Spam Referrer Blocker, Vulnerability Scanners, User-Agents, Malware, Adware, Ransomware, Malicious Sites, with anti-DDOS, Wordpress Theme Detector Blocking and Fail2Ban Jail for Repeat Offenders
Other
3.97k stars 477 forks source link

[BUG] `update-ngxblocker -z` doesn't work without having `*.vhost` files #501

Open drptbl opened 1 year ago

drptbl commented 1 year ago

Describe the bug

update-ngxblocker -z doesn't work without having *.vhost files. This forces to do manual installation as a workaround instead of using automated script inside docker containers.

To Reproduce

Steps to reproduce the behavior: Run this Dockerfile with docker build --progress=plain --no-cache .:

FROM nginx:1.23.3-alpine-slim
RUN apk add curl wget bind-tools
RUN mkdir -p /usr/local/sbin
RUN wget https://raw.githubusercontent.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/master/install-ngxblocker -O /usr/local/sbin/install-ngxblocker
RUN chmod +x /usr/local/sbin/install-ngxblocker
WORKDIR /usr/local/sbin
RUN install-ngxblocker -x
RUN chmod +x setup-ngxblocker
RUN chmod +x update-ngxblocker
RUN setup-ngxblocker -z

Expected behavior

update-ngxblocker -z should work without having *.vhost present.

Screenshots

Screenshot 2022-12-28 at 15 25 05

Server (please complete the following information):

itoffshore commented 1 year ago

the clue is in the error message - the vhost extension can be customized with -e