回复 11# 的帖子
绑定你要用的域名啦 :(回复 12# 的帖子
yc013t 那我ticket给客服看能不能改回复 13# 的帖子
你不要管主机里面的hostname ,那个不用理它。你只要改nginx.conf 里面的server_name 就行了,server_name 是对应绑定的域名。
然后规则放在这个server段里面。
回复 14# 的帖子
看来多此一举.....yc014t 幸好还没ticket 把你的那个 改了下 中间的红色的 为你的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;
}
}
回复 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也就是最后一行的} 你自己自己看下 这两个符号 {}是不是有多余的这个 大括号 要相对应 不能多 和 少