apache2.4部署django启动报错(初学者)
高洛峰
高洛峰 2016-10-27 14:16:46
[Python讨论组]

部署环境是: ubuntu16.04, apache2.4.18,django1.9.8

配置文件/etc/apache2/apache2.conf的全部内容

# 项目位置/home/balabala/Documents/mysite
WSGIScriptAlias / /home/balabala/Documents/mysite/mysite/wsgi.py
WSGIPythonPath /home/balabala/Documents/mysite
<Directory /home/balabala/Documents/mysite/mysite>
<Files wsgi.py>
Require all granted
</Files>
</Directory>

报错信息

$ systemctl start apache2.service
Job for apache2.service failed because the control process exited with error code. 
See "systemctl status apache2.service" and "journalctl -xe" for details.


$ systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since 一 2016-09-19 14:23:24 CST; 35s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 7106 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

9月 19 14:23:24 yue apache2[7106]:  *
9月 19 14:23:24 yue apache2[7106]:  * The apache2 configtest failed.
9月 19 14:23:24 yue apache2[7106]: Output of config test was:
9月 19 14:23:24 yue apache2[7106]: AH00534: apache2: Configuration error: No MPM loaded.
9月 19 14:23:24 yue apache2[7106]: Action 'configtest' failed.
9月 19 14:23:24 yue apache2[7106]: The Apache error log may have more information.
9月 19 14:23:24 yue systemd[1]: apache2.service: Control process exited, code=exited status=1
9月 19 14:23:24 yue systemd[1]: Failed to start LSB: Apache2 web server.
9月 19 14:23:24 yue systemd[1]: apache2.service: Unit entered failed state.
9月 19 14:23:24 yue systemd[1]: apache2.service: Failed with result 'exit-code'.

问题描述

自己就是按照官方文档配置了第一步,然后systemctl start apache2就出现了上面的error,初学者拜托各位指教。


高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

全部回复(1)
三叔

从下面这行错误,应该是没有加载wsgi模块:

9月 19 14:23:24 yue apache2[7106]: AH00534: apache2: Configurationerror: No MPM loaded.

如果用的是mod_wsgi,配置中需要加载它:

LoadModule wsgi_module modules/mod_wsgi.so


热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号