lnmp - How to set the Nginx server IP to access a certain directory
PHPz
PHPz 2017-05-16 17:15:21
0
1
637

Anti-empty header host binding is set in the configuration file:
server{

listen 80 default_server;
server_name _;
return 500;

}
In this case, the IP cannot access the website. Currently, I want to allow the IP to access the /phpmyadmin/ directory, but other directories are not allowed to access. How should I configure it?

PHPz
PHPz

学习是最好的投资!

reply all(1)
迷茫

Comment out this paragraph first, or use the domain name to access phpmyadmin.
Restrict IP access

location ~ ^/phpmyadmin/ {
          allow 192.168.1.0/24
          deny all;
}

See the answer link on the first floor

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template