有个需求,就是配置nginx目录只能访问html文件,不能访问php文件?
有没有高手配置过?
location ~ [^/]\.php(/|$) {
#fastcgi_pass remote_php_ip: 9000;
fastcgi_pass unix: /dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~* ^/onlyhtml/.*.(php|php5)$ {
deny all;
}我这么配置没有效果啊 

