想在NGNIX的一个 非 主域名 安装wordpress 3.0 的multi site

但是NGINX下如何启用wildcard subdomains 呢?

我的vps上装的lnmp

另外,我已经在我domain.com后台的域名下设置了cname 为 *.xxx.com 指向 xxx.com

现在我访问 test.xxx.com 显示我 主域名 的页面

是不是wordpress 3.0 必须在 主域名 下安装才能使用multi site 这个功能, 在 非 主域名 下安装的wordpress 3.0 的无法启用multi site 这个功能?

我在 非 组域名 xxx.com.conf的配置文件是这样的,不知道错在哪里- server

  • {
  • listen 80;
  • server_name xxx.com *.xxx.com;
  • index index.html index.htm index.php default.html default.htm default.php;
  • root /home/wwwroot/xxx.com;
  • - #include wordpress.conf;
  • location ~ .*\.(php|php5)?$
  • {
  • fastcgi_pass unix:/tmp/php-cgi.sock;
  • fastcgi_index index.php;
  • include fcgi.conf;
  • }
  • - location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  • {
  • expires 30d;
  • }
  • - location ~ .*\.(js|css)?$
  • {
  • expires 12h;
  • }
  • - #on server block
  • ##necessary if using a multi-site plugin
  • server_name_in_redirect off;
  • ##necessary if running Nginx behind a reverse-proxy
  • port_in_redirect off;
  • rewrite ^./files/(.)$ /wp-includes/ms-files.php?file=$1 last;
  • if (!-e $request_filename) {
  • rewrite ^.+?(/wp-.*) $1 last;
  • rewrite ^.+?(/.*\.php)$ $1 last;
  • rewrite ^ /index.php last;
  • }
  • - - log_format www.xxx.com '$remote_addr - $remote_user [$time_local] $request '
  • '$status $body_bytes_sent $http_referer '
  • '$http_user_agent $http_x_forwarded_for';
  • access_log www.xxx.com.log www.xxx.com;
  • }复制代码

[ 本帖最后由 GoTop 于 2010-8-1 19:42 编辑 ]