无效命令“WSGIReloadMechanism”在我的 Apache 站点的配置文件中
我正在尝试部署 Django 项目,并使用 Apache2 和 mod_wsgi。以下是我的 Apache conf 文件中的相关行:
WSGIScriptReloading On
WSGIDaemonProcess myprojectcom
WSGIReloadMechanism Process
WSGIProcessGroup myprojectcom
WSGIApplicationGroup myprojectcom
WSGIPassAuthorization On
WSGIScriptAlias / /home/myproject/myproject/deploy/deploy.wsgi
我在许多其他部署中使用了非常相似的 conf 文件,但这是我第一次收到以下错误:
/etc/apache2/sites-available$ sudo /etc/init.d/apache2 restart
Syntax error on line 8 of /etc/apache2/sites-enabled/myproject.com:
Invalid command 'WSGIReloadMechanism', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
尽管我没有看到任何语法错误。我在 Ubuntu 上,使用 libapache2-mod-wsgi 包。可能出什么问题了?
I am trying to deploy a Django project and am using Apache2 with mod_wsgi. Here are the relevant lines in my Apache conf file:
WSGIScriptReloading On
WSGIDaemonProcess myprojectcom
WSGIReloadMechanism Process
WSGIProcessGroup myprojectcom
WSGIApplicationGroup myprojectcom
WSGIPassAuthorization On
WSGIScriptAlias / /home/myproject/myproject/deploy/deploy.wsgi
I've used a very similar conf file for many other deployments, but this is the first time that I'm getting the following error:
/etc/apache2/sites-available$ sudo /etc/init.d/apache2 restart
Syntax error on line 8 of /etc/apache2/sites-enabled/myproject.com:
Invalid command 'WSGIReloadMechanism', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
I don't see any syntax error, though. I'm on Ubuntu, using the libapache2-mod-wsgi package. What could be wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
删除整行:
不再需要它,并且该指令在 mod_wsgi 3.X 中被完全删除。
您最好不要依赖旧的博客文章来了解如何设置 mod_wsgi,而是使用 mod_wsgi 站点上的实际 mod_wsgi 文档。
Remove the whole line:
It isn't needed any more and the directive was removed completely in mod_wsgi 3.X.
You should preferable not rely on old blog posts for how to set up mod_wsgi and use the actual mod_wsgi documentation on the mod_wsgi site instead.