请教大佬们, op 上 nginx 读取不到/proc/net/arp 内容的问题

17次阅读

共计 471 个字符,预计需要花费 2 分钟才能阅读完成。

固件是官方 openwrt,nginx 是 root 启动的,请求 /proc/net/arp 会返回一个 content-length 为 0 的 200 响应,而不是找不到文件的 404,有人知道是什么问题么?是因为 proc 这个目录特殊还是?或者说有什么除拷贝一个出来之外的办法能让 nginx 返回这个 arp 表吗

“`bash

location /download/procnet {

alias /proc/net/;

}

“`

“`bash

➜ ~ curl https://xxx.xxx/download/procnet/arp -I

HTTP/1.1 200 OK

Server: nginx

Date: Sat, 25 May 2024 13:06:14 GMT

Content-Type: application/octet-stream

Content-Length: 0

Last-Modified: Sat, 25 May 2024 13:06:14 GMT

Connection: keep-alive

ETag: “6651e246-0”

Accept-Ranges: bytes

“`

请求一个不存在的文件的话会返回 404

正文完
 0