【发布时间】:2021-03-06 10:46:15
【问题描述】:
我正在尝试将旧客户端移动到新服务器并让 WSGI 为他的 django 后端工作。我使用 yum 安装了 wsgi; httpd -M 命令显示它已安装。但是,文件 mod_wsgi.so 似乎不在服务器上。之前我曾尝试在 httpd.conf 文件中包含一个 WSGIScriptAlias 命令,并收到此错误:
/etc/apache2/conf.d/includes/pre_main_global.conf.tmp: Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in the server configuration --- /etc/apache2/conf.d/includes/pre_main_global.conf.tmp --- 1 ===> WSGIScriptAlias /spdre /home/pdr887629/django/sullivan/wsgi.py <=== --- /etc/apache2/conf.d/includes/pre_main_global.conf.tmp ---
关于该错误消息的另一个 Stack Overflow 解决方案说我应该首先包含这个:
LoadModule wsgi_module modules/mod_wsgi.so
但是 mod_wsgi.so 文件实际上并不存在于该目录或服务器上的任何其他位置。如何让 mod_wsgi 工作?我是否需要通过其他方法重新安装,或者我可以从这里去哪里(使用当前安装)?
感谢您的帮助。
【问题讨论】:
标签: python django apache mod-wsgi