我让weblate在dev模式下运行:8000。但我无法在虚拟环境中使用wsgi在apache2中运行它,在虚拟环境中,一切都正常工作。
基于apache的错误,它甚至找不到安装的django。我这样做了,但我看到了另一个缺少模块的错误。很明显,wsgi没有尊重/搜索python的virtualenv中的模块。
我的服务器是Ubuntu 19.04。
请提个建议。
<VirtualHost *:80>
ServerName xxyyzz.com
# DATA_DIR/static/favicon.ico
Alias /favicon.ico xxyyzz/weblate-env/lib/python3.7/site-packages/data/static/favicon.ico
# DATA_DIR/static/
Alias /static/ xxyyzz/weblate-env/lib/python3.7/site-packages/data/static/
<Directory xxyyzz/weblate-env/lib/python3.7/site-packages/data/static/>
Require all granted
</Directory>
# DATA_DIR/media/
Alias /media/ xxyyzz/weblate-env/lib/python3.7/site-packages/data/media/
<Directory /home/weblate/data/media/>
Require all granted
</Directory>
# Path to your Weblate virtualenv
WSGIDaemonProcess weblate python-path=xxyyzz/weblate-env
WSGIProcessGroup weblate
WSGIApplicationGroup weblate
WSGIScriptAlias / xxyyzz/weblate-env/lib/python3.7/site-packages/weblate/wsgi.py process-group=weblate
WSGIPassAuthorization On
<Directory xxyyzz/weblate-env/lib/python3.7/site-packages/weblate/>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
</VirtualHost>发布于 2020-05-05 22:03:49
事实证明,示例配置是错误的,它应该使用python-path而不是WSGIDaemonProcess的python-home。我刚刚使用了fixed this in Weblate,您可能也需要在配置中进行这样的更改。
https://stackoverflow.com/questions/61607782
复制相似问题