|
server
{
listen 80;
server_name host1.moltown.com;
location / {
stub_status on;
access_log off;
}
location / {
rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;
rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.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/$1 permanent;
}
rewrite ^/(post|record|sort|author|page)-([0-9]+)\.html$ /index.php?$1=$2;
rewrite ^/tag-(.+)\.html$ /index.php?tag=$1;
}
}
测试出现[emerg]: duplicate location "/" in /usr/local/nginx/conf/nginx.conf:103
configuration file /usr/local/nginx/conf/nginx.conf test failed
我看别人都这样插入静态规则的...怎么就不能重复呢 |
|