nginx 配置文件配置

server {
listen 80 ;
server_name test.com www.test.com;
index index.html index.php index.htm;
root /alidata/www/test/public/; if ( $query_string ~* ".*[\;'\<\>].*" ){
return 404;
} return 404;
} location / {
try_files $uri $uri/ /index.php?$query_string;
} if (!-f $request_filename){
rewrite ^/(.+)$ /index.php?$1& last;
} location ~ .*\.(php|php5)?$
{
if ( $host != 'test.com' ) {
rewrite ^/(.*)$ http://test.com permanent;
} fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
access_log /alidata/log/nginx/access/default.log;
}

  

上一篇:使用sp_addextendedproperty添加描述信息


下一篇:MyBatis与Hibernate的区别?