Access control is the only certain ip access,
Based on IP:
Create a directory under the root directory two a,
[root@oldboy--01 nginx]# cd html
[root@oldboy--01 html]# ls
50x.html a b index.html web01 web02
LOCATION / A { return img # Return to image return 503 # confuse the enemy } |
Access to the physical machine 10.0.0.200/a, is limited
Based account password:
Download dependencies: yum -y install httpd-tools
Create an account profiles etc directory: mkdir / etc / nginx / htpasswd
Create a user
nginx.conf verification information and create two paths
Root directory create two files b
Implement login authentication, if the board does not go up, the password is not encrypted
Create an encrypted
View to create a user: vim / etc / nginx / htpasswd sky
Login successful