首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Debian9/Apache2.4/Radalal2.1/ uWSGI

Debian9/Apache2.4/Radalal2.1/ uWSGI
EN

Stack Overflow用户
提问于 2020-05-07 16:17:13
回答 1查看 226关注 0票数 0

我正在尝试通过uWSGI和Apache使用激进式。

经过一番努力,我设法在Apache上使用了WSGI for radicale,但我想把身份验证工作卸载给Apache。

因此,我将apache conf创建为

代码语言:javascript
复制
<VirtualHost *:80>
ServerAdmin xxx@gmail.com
ServerName radicale.domain.com

ProxyPass / uwsgi://127.0.0.1:5232/

<Directory "/etc/radicale">
AllowOverride None
Require all granted
</Directory>

TransferLog /var/log/apache2/radicale_access.log
ErrorLog /var/log/apache2/radicale_error.log
</VirtualHost>

我的uwsgi应用是

代码语言:javascript
复制
[uwsgi]
http-socket = 127.0.0.1:5232
processes = 2
plugin = python3
#module = radicale
wsgi-file=/etc/radicale/radicale.wsgi
env = RADICALE_CONFIG=/etc/radicale/config

当我调用http://radicale.domain.com时,我得到一个通用的500错误,但我在apache错误日志或uswgi日志中看不到任何错误。uwsgi日志显示(详细)

代码语言:javascript
复制
Thu May  7 17:40:39 2020 - *** Starting uWSGI 2.0.14-debian (64bit) on [Thu May  7 17:40:39 2020] ***
Thu May  7 17:40:39 2020 - compiled with version: 6.3.0 20170516 on 17 March 2018 15:41:47
Thu May  7 17:40:39 2020 - os: Linux-2.6.32-042stab128.2 #1 SMP Thu Mar 22 10:58:36 MSK 2018
Thu May  7 17:40:39 2020 - nodename: xxx
Thu May  7 17:40:39 2020 - machine: x86_64
Thu May  7 17:40:39 2020 - clock source: unix
Thu May  7 17:40:39 2020 - pcre jit disabled
Thu May  7 17:40:39 2020 - detected number of CPU cores: 8
Thu May  7 17:40:39 2020 - current working directory: /
Thu May  7 17:40:39 2020 - writing pidfile to /run/uwsgi/app/radicale/pid
Thu May  7 17:40:39 2020 - detected binary path: /usr/bin/uwsgi-core
Thu May  7 17:40:39 2020 - setgid() to 33
Thu May  7 17:40:39 2020 - set additional group 125 (redis)
Thu May  7 17:40:39 2020 - set additional group 5003 (ispapps)
Thu May  7 17:40:39 2020 - set additional group 5004 (ispconfig)
Thu May  7 17:40:39 2020 - setuid() to 33
Thu May  7 17:40:39 2020 - your processes number limit is 256137
Thu May  7 17:40:39 2020 - your memory page size is 4096 bytes
Thu May  7 17:40:39 2020 - detected max file descriptor number: 131072
Thu May  7 17:40:39 2020 - lock engine: pthread robust mutexes
Thu May  7 17:40:39 2020 - thunder lock: disabled (you can enable it with --thunder-lock)
Thu May  7 17:40:39 2020 - uwsgi socket 0 bound to UNIX address /run/uwsgi/app/radicale/socket fd 3
Thu May  7 17:40:39 2020 - uwsgi socket 1 bound to TCP address 127.0.0.1:5232 fd 5
Thu May  7 17:40:39 2020 - Python version: 3.5.3 (default, Sep 27 2018, 17:25:39)  [GCC 6.3.0 20170516]
Thu May  7 17:40:39 2020 - *** Python threads support is disabled. You can enable it with --enable-threads ***
Thu May  7 17:40:39 2020 - Python main interpreter initialized at 0x7fc12c963dd0
Thu May  7 17:40:39 2020 - your server socket listen backlog is limited to 100 connections
Thu May  7 17:40:39 2020 - your mercy for graceful operations on workers is 60 seconds
Thu May  7 17:40:39 2020 - mapped 218304 bytes (213 KB) for 2 cores
Thu May  7 17:40:39 2020 - *** Operational MODE: preforking ***
Thu May  7 17:40:39 2020 - WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x7fc12c963dd0 pid: 23261 (defau
lt app)
Thu May  7 17:40:39 2020 - *** uWSGI is running in multiple interpreter mode ***
Thu May  7 17:40:39 2020 - spawned uWSGI master process (pid: 23261)
Thu May  7 17:40:39 2020 - spawned uWSGI worker 1 (pid: 23267, cores: 1)
Thu May  7 17:40:39 2020 - spawned uWSGI worker 2 (pid: 23268, cores: 1)

如何调试uwsgi?如何了解Apache返回500错误的原因?我对conf做错了什么吗?当涉及到错误调试或理解如何定义模块时,我发现这些文档不是很有用。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-05-15 12:26:34

好了,经过一周的思考、调试和咒骂,我发现我犯了一个相当愚蠢的错误:

我在UWSGI中配置了HTTP套接字

代码语言:javascript
复制
http-socket = 127.0.0.1:5232

但在Apache中指定了uwsgi协议...

代码语言:javascript
复制
ProxyPass / uwsgi://127.0.0.1:5232/
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61653009

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档