use*_*400 6 apache config unix-socket uwsgi
我有一个为 unix 域套接字运行的 uwsgi 服务器
[uwsgi]
...
socket = /var/run/someuwsgi.sock
socket = localhost:9987
...
Run Code Online (Sandbox Code Playgroud)
mod_proxy_uwsgi 已安装
在 apache 配置中有这一行:ProxyPass /some uwsgi://localhost:9987
它正在发挥作用。
问题:通过 unix 域套接字 /var/run/someuwsgi.sock 的 apache 配置行应该是什么?我试过
ProxyPass /some uwsgi:///var/run/someuwsgi.sock
Run Code Online (Sandbox Code Playgroud)
并得到
Bad Request
Your browser sent a request that this server could not understand.
Run Code Online (Sandbox Code Playgroud)
也试过
ProxyPass /some uwsgi://unix:///var/run/someuwsgi.sock
Run Code Online (Sandbox Code Playgroud)
并得到
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /some/.
Reason: DNS lookup failure for: unix:
Run Code Online (Sandbox Code Playgroud)
谢谢!
从 Apache 2.4.7 开始,增加了对 Unix 套接字的支持。语法非常简单:
ProxyPass / unix:/tmp/uwsgi.sock|uwsgi://
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5658 次 |
| 最近记录: |