A
A
alexxxhost2016-03-03 22:13:57
Nginx
alexxxhost, 2016-03-03 22:13:57

How to configure ip access in nginx?

Hello!
Tell me how to configure access to nginx by ip, so http://111.222.333.444/site1 ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2016-03-03
@HeadOnFire

# Возможные контексты: http, server
server {
    ...
    # Запретить доступ всем кроме разрешенных IP
    allow 192.168.1.0/24;
    deny all;
    ...
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question