【发布时间】:2014-12-03 18:09:58
【问题描述】:
我已经从源代码安装了 mod_wsgi,以便像这样使用 python2.7:
git clone https://github.com/GrahamDumpleton/mod_wsgi.git
./configure --with-python=/usr/bin/python2.7
make
make install
当我尝试启动 apache 时,出现错误:
Starting httpd: Syntax error on line 1020 of /etc/httpd/conf/httpd.conf:
Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in the server configuration
[FAILED]
我的 httpd.conf 如下所示:
Alias /static/ /var/www/html/django/shared/static/
<Directory /var/www/html/django/shared/static/>
Order deny,allow
Allow from all
</Directory>
WSGIScriptAlias / /var/www/html/django/wsgi.py
WSGIPythonPath /var/www/html/django
<Directory /var/www/html/django>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
为什么 apache 没有找到 mod_wsgi?
【问题讨论】:
-
你真的告诉 Apache 加载模块吗?
-
@abarnert 你知道我是怎么做到的吗?
标签: python linux apache python-2.7 mod-wsgi