今天为xiaochunchun做301跳转了,记录一下,方便下次使用:
server {
listen 80;server_name www.xiaochunchun.com xiaochunchun.com;
if ($host != 'www.xiaochunchun.com' ) {
rewrite ^/(.*)$ http://www.xiaochunchun.com/$1 permanent;
}
index index.html index.htm index.php;
root /alidata/www/ycsc/web;
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
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;
}
include /alidata/server/nginx/conf/rewrite/phpwind.conf;
access_log /alidata/log/nginx/access/ycsc.log;
}