location ^~ /static/ {
# 禁止PHP文件访问
location ~ \.php$ {
deny all;
return 403;
}
# 其他静态文件配置
try_files $uri =404;
expires max;
access_log off;
}
location ^~ /static/ {
# 禁止PHP文件访问
location ~ \.php$ {
deny all;
return 403;
}
# 其他静态文件配置
try_files $uri =404;
expires max;
access_log off;
}