|
server
{
listen 80;
server_name xxxx.com;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/xxxx.com;
include none.conf;
#匹配多个上传目录
location ~ ^/(Upload|Upload1)
{
# 匹配文件最名包含两个.以上的文件
location ~ "([.]{2,})$"
{
deny all;
}
# 配置php和php5后缀
location ~ ".(php|php5)$"
{
deny all;
}
}
location ~ .*.(php|php5)?$
{
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*.(js|css)?$
{
expires 12h;
}
access_log off;
}
|