本帖最后由 .娱乐随你. 于 2010-02-12 13:22 编辑 服务器
server {
listen 80;
server_name
www.xxx.c..om xxx.com; 婚庆
index. index.html index.php ind.ex.htm; 乙肝
ac.cess_log off; 电子
charset utf8;
root /var/www/xxx..com; 建材
if ($host !~ "^www\..xxx\.com$"). { 健康
rewrite ^(.*)
http://www.xxx.com$1 permanent; 乙肝
}
location ~*. .\.(js|css|jpg|jpeg|gif|png)$ {.
r.oot /var/www/xxx.com;健康
expires 3d;
#break;
}
location ~* \.(html)$. {.
root /var/w.ww/xxx.com;电影
expires 6h;
#break;
}
error_page 404 /404.ht.ml;.
# redirect server. error pages to the static page ./50x.html.
#error_.page 500 502 503 .504 /50x.html;.
#locatio.n = /50x.html {<性病>
#.root. /var/www/nginx-default;.
#}
#. proxy the PHP scripts to Apache listening on 127..0.0.1:80 电子
#location ~ \..php$ {<性病>
#fastcg.i_.pass 127.0.0.1:80;.
#fastcgi_index index.php.;.
#fastcgi_p.aram SCRIPT_.FILENAME /scripts$fastcgi_script_name;域名
#includefastc.gi_params;[成人用品]
#}
# pass the PHP scripts to FastCGI server listenin.g on 127.0..0.1:9000.
locat.ion ~ \.php { 女人
fastcgi_pass 12.7.0.0.1:900.0;.
fastcgi_in.dex index.php; 健康
set $path_in.fo "/";<性病>
set $real_script_name $fas..tcgi_script_name;外贸
if ($fastcgi_sc.ript_name ~ "^(.+?\.ph.p)(/.+)$") { 建材
set $real_script_name $1.;.
s.et $path_info $2; 健康
}
fastcgi_par.am SCRIPT_FILENAME /var/www/xxx.com/$real_sc.ript_name; 乙肝
fastcgi_param S.CRIPT_NAME $real_script._name;投资
fastcgi._param PATH_INF.O $path_info;[成人用品]
include /etc./nginx/fastcgi_par.ams;教育
}
}
复制代码Ubuntu/9.04 nginx/0.6..3.5学习
它仅缓存了根目录下边的文.件,首页调用的别的目录下边.的图片不缓存学习
高人帮忙看看,急啊