mojave 发表于 2009-10-12 22:11:14

绑定的是,但是C大当时不说随便绑定个域名么,host1.moltown.com是我申请时候绑定VPS的....

cpuer 发表于 2009-10-12 22:19:58

回复 11# 的帖子

绑定你要用的域名啦 :(

mojave 发表于 2009-10-12 22:22:22

回复 12# 的帖子

yc013t 那我ticket给客服看能不能改

cpuer 发表于 2009-10-12 22:24:51

回复 13# 的帖子

你不要管主机里面的hostname ,那个不用理它。

你只要改nginx.conf 里面的server_name 就行了,server_name 是对应绑定的域名。

然后规则放在这个server段里面。

mojave 发表于 2009-10-12 22:33:41

回复 14# 的帖子

看来多此一举.....yc014t 幸好还没ticket

zyypp 发表于 2009-10-12 22:39:33

把你的那个 改了下 中间的红色的 为你的rewrite 我不知道 对不 所以 也没改
总体 就是这个结构了

server
{
   listen80;
   server_name要绑定的域名;
   root网站目录的绝对路径;

location / {
   rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;
   rewrite ^/forum-(+)-(+)\.html$ /forumdisplay.php?fid=$1&page=$2 last;
   rewrite ^/thread-(+)-(+)-(+)\.html$ /viewthread.php?tid=$1&extra=page%3D$3&page=$2 last;
   rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last;
   rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;
   break;
   if ($host != 'moltown.com/my' ) {
      rewrite^/(.*)$http://moltown.com/my/$1permanent;
   }
   rewrite ^/(post|record|sort|author|page)-(+)\.html$ /index.php?$1=$2;
   rewrite ^/tag-(.+)\.html$ /index.php?tag=$1;
}

location /status {
   stub_status on;
   access_log   off;
}
}

mojave 发表于 2009-10-12 22:46:26

回复 16# 的帖子

测试下
unexpected end of file, expecting "}" in /usr/local/nginx/conf/nginx.conf:117
configuration file /usr/local/nginx/conf/nginx.conf test failed
说的117也就是最后一行的}

zyypp 发表于 2009-10-12 22:51:57

你自己自己看下 这两个符号 {}是不是有多余的这个 大括号 要相对应 不能多 和 少

mojave 发表于 2009-10-12 22:55:18

回复 18# 的帖子

肯定是匹配的才行,今天我改的时候也碰到N次这个问题,我以为小学数学没学好,但是确实是匹配的....yc020t

zyypp 发表于 2009-10-12 23:02:41

你把 配置 贴上来 过着 pm过来
页: 1 [2] 3 4 5 6
查看完整版本: nginx静态规则这样添加为何不行,该如何改