产品服务AMH 免费服务器主机面板SSL证书 免费SSL证书申请 担保单 免费安全、零费率交易平台编程助手免费智能写代码、翻译AMYSQL 免费MySQL管理工具

AMH 社区首页

 AMH社区 - 开放自由有价值的社区

[求助帖] 改Rewrite後,出現錯誤,啓動不了WEB服務

chanbanana
铁牌会员
52.00 价值分

chanbanana 发表于 2014-01-10 23:31:12
[警告] Nginx配置Rewrite规则错误,请查检改正。
[AMRewrite-1.0 admin] [OK] AMRewrite-1.0 is already installed.
nginx: [emerg] duplicate location "/" in /usr/local/nginx/conf/vhost/compassmacau.conf:20
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

麻煩各位指教指教,現在全部網站都停了.
www.vinha.com.mo
评价: 这个问题有价值吗?  没有 (0分)   有, 感谢 (0分)
2014-01-10 23:31:12 1

wilsonjor
铁牌会员
182.00 价值分

那就是规则错误了,在网上搜一下吧。新增一个正确的规则试试看
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-01-10 23:38:25 2

chanbanana
铁牌会员
52.00 价值分

我已經,是COPY這個論壇的那個規則了.但也一樣
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-01-11 09:06:51 3

Yusky
金牌会员
11307.70 价值分

把规则贴出来看看。
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-01-11 13:47:26 4

chanbanana
铁牌会员
52.00 价值分

location / {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-01-11 18:47:52 5

CodeByMe
银牌会员
1410.00 价值分

400错误是域名没识别出来
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-01-11 19:05:29 6

tanyuxiang
金牌会员
5420.37 价值分

nginx: [emerg] duplicate location "/" in /usr/local/nginx/conf/vhost/compassmacau.conf:20



/usr/local/nginx/conf/vhost/compassmacau.conf:20
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-01-11 20:01:08 7

Yusky
金牌会员
11307.70 价值分

引用:
tanyuxiang 发表于 2014-1-11 20:01
nginx: [emerg] duplicate location "/" in /usr/local/nginx/conf/vhost/compassmacau.conf:20




虚拟主机, 截图看看
compassmacau.conf 这个贴出来看看

估计你域名没绑定好
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2014-01-12 00:49:30 8
 1  (总1页)
AMH社区列表
用户服务中心