T
T
tempmon2019-04-26 14:36:07
Nginx
tempmon, 2019-04-26 14:36:07

How to restrict access from outside on certain links?

Good day.
Please tell me how to restrict access from outside for several links of the /applications/api type, and open for applications/api/*, local access should be for all links without restrictions, we use nginx.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Popov, 2019-04-26
@be_a_dancer

Not too hard if you read the documentation or just google it .

location /application/api {
  # block one workstation
  deny    192.168.1.1;
  # allow anyone in 192.168.1.0/24
  allow   192.168.1.0/24;
  # drop rest of the world 
  deny    all;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question