我收到“无效命令'WSGIScriptAlias'"启动Apache时出错 [英] I am getting "Invalid command 'WSGIScriptAlias' " error while starting Apache

查看:174
本文介绍了我收到“无效命令'WSGIScriptAlias'"启动Apache时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将Django项目部署到EC2服务器.我安装了mod_wsgi.

I want to deploy my Django project to EC2 server. I installed mod_wsgi.

并像django的教程中那样进行配置.

And made configuration like in the tutorial of django.

我得到以下信息:

Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in the server configuration

原因是什么? mod_wsgi安装不正确?

What is the reason? mod_wsgi is not installed correctly?

LoadModule wsgi_module     libexec/httpd/mod_wsgi.so
LoadModule alias_module    libexec/httpd/mod_alias.so


WSGIScriptAlias / /usr/local/apache2/htdocs/mysite/mysite/wsgi.py
WSGIPythonPath /usr/local/apache2/htdocs/mysite/mysite


<Directory /path/to/mysite.com/mysite>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>

推荐答案

该错误专门表明mod_wsgi没有被加载到Apache中.

The error specifically indicates that mod_wsgi is not being loaded into Apache.

在什么文件中:

LoadModule wsgi_module     libexec/httpd/mod_wsgi.so

您是否使用适当的Linux发行版管理命令启用了mod_wsgi模块,以便在对mod_wsgi使用发行版二进制软件包时将其加载?

Did you enable the mod_wsgi module with appropriate Linux distro management command so that it will be loaded if you used distro binary packages for mod_wsgi?

这篇关于我收到“无效命令'WSGIScriptAlias'"启动Apache时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆