我修改的是
/www/wdlinux/nginx-0.8.54/conf/vhost/123.com.conf
修改內(nèi)容如下
server {
listen 80;
server_name 123.com www.123.com;
root /www/web/123/public_html;
index index.html index.php index.htm;
error_page 404 /errpage/404.html;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 1d;
}
location ~ .*\.(js|css)?$ {
expires 12h;
}
server {
listen 80;
server_name www.123.com htcwp.com;
if ($host != 'www.123.com' ) {
rewrite ^/(.*)$ http://bbs.123.com/$1 permanent;
}
}