openstcak搭建M版Apache2无法启动

zhlzhanglin 2017-04-07 01:21:07
配置 Apache HTTP 服务器

编辑``/etc/apache2/apache2.conf``文件,为控制节点配置``ServerName``选项:

ServerName controller
使用下面的内容创建``/etc/apache2/sites-available/wsgi-keystone.conf``文件:

Listen 5000
Listen 35357

<VirtualHost *:5000>
WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-public
WSGIScriptAlias / /usr/bin/keystone-wsgi-public
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
ErrorLogFormat "%{cu}t %M"
ErrorLog /var/log/apache2/keystone.log
CustomLog /var/log/apache2/keystone_access.log combined

<Directory /usr/bin>
Require all granted
</Directory>
</VirtualHost>

<VirtualHost *:35357>
WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-admin
WSGIScriptAlias / /usr/bin/keystone-wsgi-admin
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
ErrorLogFormat "%{cu}t %M"
ErrorLog /var/log/apache2/keystone.log
CustomLog /var/log/apache2/keystone_access.log combined

<Directory /usr/bin>
Require all granted
</Directory>
</VirtualHost>
开启认证服务虚拟主机:

# ln -s /etc/apache2/sites-available/wsgi-keystone.conf /etc/apache2/sites-enabled
完成安装

重启Apache HTTP服务器

# service apache2 restart

root@controller:/home/controller# service apache2 restart
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
root@controller:/home/controller# 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 Thu 2017-04-06 22:17:34 PDT; 26s ago
Docs: man:systemd-sysv-generator(8)
Process: 20394 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Apr 06 22:17:34 controller apache2[20394]: * The apache2 configtest failed.
Apr 06 22:17:34 controller apache2[20394]: Output of config test was:
Apr 06 22:17:34 controller apache2[20394]: AH00526: Syntax error on line 5 of /etc/apache2/sites-enabled/
Apr 06 22:17:34 controller apache2[20394]: Invalid command 'WSGIDaemonProcess', perhaps misspelled or def
Apr 06 22:17:34 controller apache2[20394]: Action 'configtest' failed.
Apr 06 22:17:34 controller apache2[20394]: The Apache error log may have more information.
Apr 06 22:17:34 controller systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 06 22:17:34 controller systemd[1]: Failed to start LSB: Apache2 web server.
Apr 06 22:17:34 controller systemd[1]: apache2.service: Unit entered failed state.
Apr 06 22:17:34 controller systemd[1]: apache2.service: Failed with result 'exit-code'.

root@controller:/home/controller# journalctl -xe
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Apr 06 22:17:34 controller apache2[20394]: * Starting Apache httpd web server apache2
Apr 06 22:17:34 controller apache2[20394]: *
Apr 06 22:17:34 controller apache2[20394]: * The apache2 configtest failed.
Apr 06 22:17:34 controller apache2[20394]: Output of config test was:
Apr 06 22:17:34 controller apache2[20394]: AH00526: Syntax error on line 5 of /etc/apache2/sites-enabled/
Apr 06 22:17:34 controller apache2[20394]: Invalid command 'WSGIDaemonProcess', perhaps misspelled or def
Apr 06 22:17:34 controller apache2[20394]: Action 'configtest' failed.
Apr 06 22:17:34 controller apache2[20394]: The Apache error log may have more information.
Apr 06 22:17:34 controller systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 06 22:17:34 controller systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Apr 06 22:17:34 controller systemd[1]: apache2.service: Unit entered failed state.
Apr 06 22:17:34 controller systemd[1]: apache2.service: Failed with result 'exit-code'.

root@controller:/home/controller#
大神求解决
...全文
1663 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
alinly 2017-09-27
  • 打赏
  • 举报
回复
Apr 06 22:17:34 controller apache2[20394]: Invalid command 'WSGIDaemonProcess', perhaps misspelled or def 查看httpd的keystone配置问家,应该是少了这些:例如: WSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi Alias /dashboard/static /usr/share/openstack-dashboard/static <Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>
ly505984452 2017-06-06
  • 打赏
  • 举报
回复
我搭建的时候apache没出过什么问题啊,你问题解决了没

998

社区成员

发帖
与我相关
我的任务
社区描述
OpenStack
社区管理员
  • OpenStack社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧