index index.html index.htm index.php;
root /data/wwwroot/task.fzyunyin.cn/public;
location ~ .*\.(wma|wmv|asf|mp3|mmf|zip|rar|jpg|gif|png|swf|flv|mp4)$ {
valid_referers none blocked *.fzyunyin.cn task.fzyunyin.cn;
if ($invalid_referer) {
return 403;
}
}
location ~\.php$ {
fastcgi_pass unix:/dev/shm/php-cgi.sock;#一定要注意正确配置fastcgi_pass的路径和起点
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
location ~ /\.ht {
deny all;
}
location ~.*\.(sql|log|txt|jar|war|sh|py) {
deny all;
}
网友评论