#这个代码为什么对泛解析域名的站 加了白名单的ip(不生效)网站访问不进 不是泛解析的站测试是正常的 求助大佬如何解决 代码如下#
[root@china vhosts]# cat testwww.wangshibo.com.conf
server {
listen 80;
server_name testwww.wangshibo.com;
root /var/www/vhosts/testwww.wangshibo.com/httpdocs/main;
access_log /var/www/vhosts/testwww.wangshibo.com/logs/access.log main;
error_log /var/www/vhosts/testwww.wangshibo.com/logs/error.log;
##白名单设置,只允许下面三个来源ip的客户端以及本地能访问该站。
allow 100.110.15.16;
allow 100.110.15.17;
allow 100.110.15.18;
allow 127.0.0.1;
deny all;
location / {
try_files $uri $uri/ @router;
index index.php;
}
error_page 500 502 503 504 /50x.html;
location @router {
rewrite ^.*$ /index.php last;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9001;
fastcgi_read_timeout 30;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
#include fastcgi_params;
include fastcgi.conf;
}
}
|
-
如图
|