只在nginx配置文件location段加入代码后重启nginx,如下
location / {client_max_body_size 48m;index index.html index.htm index.php;if (!-e $request_filename) {rewrite ^(.*)$ /index.php?s=$1 last;break;}allow 1234;allow 4567;deny all;}
allow :允许访问的ip
deny:禁止除allow之外的ip访问
时间:2020-12-12 04:58:06
只在nginx配置文件location段加入代码后重启nginx,如下
location / {client_max_body_size 48m;index index.html index.htm index.php;if (!-e $request_filename) {rewrite ^(.*)$ /index.php?s=$1 last;break;}allow 1234;allow 4567;deny all;}
allow :允许访问的ip
deny:禁止除allow之外的ip访问