tzssangglass commented on issue #7503:
URL: https://github.com/apache/apisix/issues/7503#issuecomment-1192127824
> 1.将config-default.yaml中被注释的log-rotate配置放开
> 2.启动apisix,调用一个请求,返回200
> 3.将config-default.yaml中log-rotate配置注释(或者说是还原)
> 4.在config.yaml中配置log-rotate插件
> 5.重启apisix,调用同一个请求,返回404
>
不过再次验证了我的问题一,在config.yaml中配置plugins插件信息导致我的路由全部返回404,只能在config-default.yaml中添加
First of all, this is the wrong operation. As I said before, we should not
modify `config-default.yaml`.
I actually tried your steps 4 and 5 and found no exceptions.
config.yaml like:
```yaml
apisix:
admin_key:
- name: admin
key: edd1c9f034335f136f87ad84b625c8f1
role: admin
plugins:
- log-rotate
```
add route:
```shell
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"uri":"/get",
"upstream":{
"type":"roundrobin",
"nodes":{
"httpbin.org:80":1
}
}
}'
```
test:
```
curl http://127.0.0.1:9080get -i
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 300
Connection: keep-alive
Date: Fri, 22 Jul 2022 02:54:30 GMT
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Server: APISIX/2.14.1
{
"args": {},
"headers": {
"Accept": "*/*",
"Host": "127.0.0.1",
"User-Agent": "curl/7.29.0",
"X-Amzn-Trace-Id": "Root=1-62da1166-1aa07ef50dab5c5a7be980d2",
"X-Forwarded-Host": "127.0.0.1"
},
"origin": "127.0.0.1, xxxx",
"url": "http://127.0.0.1/get"
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]