原帖由 licess 于 2015-2-20 20:46 发表
location / {
allow 2.2.2.2;
deny all;
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf ...
原帖由 licess 于 2015-2-21 17:20 发表
不是指定目录的话
allow 2.2.2.2;
deny all;
直接加到
server段root下面就行
指定目录参考:https://www.vpser.net/build/nginx-htpasswd.html 将里面的auth_basic相关的去掉,提供成allow和deny就行了。 ...
| 欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/) | Powered by Discuz! X3.4 |