如何利用nginx
禁止php访问,下面web建站小编给大家简单介绍一下nginx
的具体配置方法!
具体代码如下:
复制代码server {
listen 80;
server_name www.dmtest.com;
location / {
root html;
index index.php index.html index.htm;
}
location ~ ^/images/.*\.(php|php5|sh|pl|py)$
{
deny all;
}
location ~ ^/static/.*\.(php|php5|sh|pl|py)$
{
deny all;
}
location ~ ^/data/(attachment|avatar).*\.(php|php5)$
{
deny all;
}
......
......
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
上面是“如何利用nginx禁止php访问”的全面内容,想了解更多关于 前端知识 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_4515.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!