Nginx.conf的设置用于Zend Framework项目
来源:岁月联盟
时间:2012-02-13
02
listen 80;
03
server_name wenda.localhost.com;
04
index index.html index.htm index.php;
05
root /wnmp/www/wenda;
06
autoindex on;
07
08
#error_page 404 /404.html;
09
10
# redirect server error pages to the static page /50x.html
11
#
12
error_page 500 502 503 504 /50x.html;
13
location = /50x.html {
14
root /wnmp/www;
15
}
16
17
location / {
18
index index.php index.html index.htm;
19
if (-f $request_filename) {
20
break;
21
}
22
if (-d $request_filename) {
23
break;
24
}
25
rewrite ^(.+)$ /index.php last;
26
}
27
28
location ~ .*/.(php|php5)?$ {
29
fastcgi_pass 127.0.0.1:9000;
30
include /wnmp/nginx/conf/fastcgi_params;
31
}
32
}