即使在将 WSGIApplication 组设置为全局后,从守护进程读取响应 headers 时超时
Timeout when reading response headers from daemon process even after setting WSGIApplication group to Global
我正在使用 Apache 在本地托管一个基于 Django 的网页。但是,我收到以下错误:
从守护进程 headers 读取响应时超时 'office':var/www/office/office/wsgi.py.
我尝试将 WSGIApplicationGroup %{GLOBAL} 行添加到 conf 文件,但仍然出现相同的错误。
这是我的 .conf 文件。
WSGIPythonPath /var/www/office
ServerName office.org
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
WSGIApplicationGroup %{GLOBAL}
<VirtualHost 0.0.0.0:80>
ServerAlias www.office.org
DocumentRoot /var/www/example.com/public_html
<Directory /var/www/example.com>
Require all granted
</Directory>
<Directory /var/www/office/office>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess office python-home=/var/www/venv python-path=/var/www/office
WSGIProcessGroup office
WSGIScriptAlias /verify /var/www/office/office/wsgi.py process-group=office
ErrorLog /var/www/logs/error.log
CustomLog /var/www/logs/custom.log combined
</VirtualHost>
这是 wsgi.py 文件:
"""
WSGI config for office project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "office.settings")
application = get_wsgi_application()
我遇到了同样的问题,经过大量的努力和尝试不同的事情,tutorial 帮助我解决了问题。
我创建并成功 运行 演示项目。我的问题是配置文件中的路径以及使用服务器 python 版本而不是为项目创建虚拟环境。
希望对你有所帮助
我在 Flask 框架中遇到了同样的问题“读取响应头时超时”
我通过在 httpd.conf/app.conf
中添加 TimeOut 600 解决了这个问题
参考:https://ubiq.co/tech-blog/increase-request-timeout-apache/
如果这发生在工作服务器上,您可以尝试强制更新您的 ssl 证书。
原因可以在 apache 错误日志中找到:
Name-based SSL 虚拟主机仅适用于具有 TLS 服务器名称指示支持 (RFC 4366) 的客户端
对我有帮助。
我正在使用 Apache 在本地托管一个基于 Django 的网页。但是,我收到以下错误:
从守护进程 headers 读取响应时超时 'office':var/www/office/office/wsgi.py.
我尝试将 WSGIApplicationGroup %{GLOBAL} 行添加到 conf 文件,但仍然出现相同的错误。
这是我的 .conf 文件。
WSGIPythonPath /var/www/office
ServerName office.org
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
WSGIApplicationGroup %{GLOBAL}
<VirtualHost 0.0.0.0:80>
ServerAlias www.office.org
DocumentRoot /var/www/example.com/public_html
<Directory /var/www/example.com>
Require all granted
</Directory>
<Directory /var/www/office/office>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess office python-home=/var/www/venv python-path=/var/www/office
WSGIProcessGroup office
WSGIScriptAlias /verify /var/www/office/office/wsgi.py process-group=office
ErrorLog /var/www/logs/error.log
CustomLog /var/www/logs/custom.log combined
</VirtualHost>
这是 wsgi.py 文件:
"""
WSGI config for office project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "office.settings")
application = get_wsgi_application()
我遇到了同样的问题,经过大量的努力和尝试不同的事情,tutorial 帮助我解决了问题。
我创建并成功 运行 演示项目。我的问题是配置文件中的路径以及使用服务器 python 版本而不是为项目创建虚拟环境。
希望对你有所帮助
我在 Flask 框架中遇到了同样的问题“读取响应头时超时”
我通过在 httpd.conf/app.conf
中添加 TimeOut 600 解决了这个问题参考:https://ubiq.co/tech-blog/increase-request-timeout-apache/
如果这发生在工作服务器上,您可以尝试强制更新您的 ssl 证书。 原因可以在 apache 错误日志中找到: Name-based SSL 虚拟主机仅适用于具有 TLS 服务器名称指示支持 (RFC 4366) 的客户端
对我有帮助。