部署环境是: 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,初学者拜托各位指教。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
从下面这行错误,应该是没有加载wsgi模块:
9月 19 14:23:24 yue apache2[7106]: AH00534: apache2: Configurationerror: No MPM loaded.
如果用的是mod_wsgi,配置中需要加载它: