技术解析
已有aaa.com,bbb.com两个域名,把aaa.com通过CNAME指向到aaa.bbb.com,
出现了404,不清楚是什么缘故?
附上vhost.conf,注释掉的方法已经试过依然404...
server
{
listen 80;
server_name bbb.com www.bbb.com aaa.bbb.com aaa.com;
index index.html index.htm index.php;
root /home/wwwroot/www.bbb.com;
#if ($host ~ "aaa\.com") {
# rewrite ^(.*) http://aaa.bbb.com$1/ permanent;
#}
location / {
try_files $u大带宽服务器ri $uri/ /index.php?$query_string;
}
location ~ [^/]\.php(/|$)
{
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /home/wwwlogs/www.bbb.com.log access;
}