[[+content_image]]
T
T
taraclia112020-10-03 15:59:35
Nginx
taraclia11, 2020-10-03 15:59:35

Trying to block access to certain IPs with nginx, nginx error?

Through the configs, according to this instruction, I make a block of IP addresses,
but at the test stage: nginx -t
gives an error:

[[email protected] vhosts-includes]# /etc/nginx/vhosts-includes/nginx -t
-bash: /etc/nginx/vhosts-includes/nginx: No such file or directory

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
K
ky0, 2020-10-03
@taraclia11

Why are you writing all this path to the binary? Do you have the nginx executable in there?
What if just nginx -tenter?

T
taraclia11, 2020-10-03
@taraclia11

The solution was to comment out this line:
Wrong:

## Block spammers and other unwanted visitors ##
include blockips.conf;

Right:
## Block spammers and other unwanted visitors ##
#include blockips.conf;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question