server {
listen 80;
server_name test.com;
charset utf-8;
root /www/web;
error_page 404 = /error.php;
location / {<br /> root /www/web;<br /> index index.html index.htm;<br /> }
匹配/wap,指向此目录
location ~ ^/wap(/.*)?$ {
alias /www/wap/$1;
}
error_page 500 502 503 504 /50x.html;<br /> location = /50x.html {<br /> root html;<br /> }
location ~ .*.(svn|git|cvs) {<br /> return 404;<br /> }
}