#代码如下:
#在nginx.conf的server配置里面写上
#public/bd 不能访问的路径
location ~* ^/(public/bd)/.*.(php|php5)$ {
deny all;
}
#nginx -s reload 一般用这个比较合理==重启过程不会影响
Service nginx restart
#更多详细过程请看视频
Nginx使用location设置某些目录不能访问php文件
#代码如下:
#在nginx.conf的server配置里面写上
#public/bd 不能访问的路径
location ~* ^/(public/bd)/.*.(php|php5)$ {
deny all;
}
#nginx -s reload 一般用这个比较合理==重启过程不会影响
Service nginx restart
#更多详细过程请看视频
Nginx使用location设置某些目录不能访问php文件