server {
listen 80;
server_name localhost;
root html;
index index.html index.htm;
#charset koi8-r;
#access_log logs/host.access.log main;
location = /js {
allow 192.168.78.128;
}
location = /admin/auth {
allow 192.168.78.200;
}
deny all;
}
配置文件如上,用192.168.78.128访问 http://192.168.78.3/admin/auth%EF%BC%8C%E5%87%BA%E7%8E%B0%E7%9A%84%E4%BF%A1%E6%81%AF%E6%98%AF404 not found ,而不是403 Forbidden,不知什么原因。