Httpd 证书的 CN 和虚拟名称配置错误

Httpd 证书的 CN 和虚拟名称配置错误

我正在 CentOS7 上部署 openstack,并且每个服务和模块都部署良好。

但是当我输入时http://<controller-ip>/dashboard,几分钟后,"Internal Server Error"出现错误消息 500。我检查/var/log/httpd/error_log后发现错误消息是:

[2017 年 10 月 9 日星期一 10:05:55.743509] [:error] [pid 27541] 证书 CN 和虚拟名称配置错误。证书 CN 具有 localhost4.localdomain4。我们预期控制器为虚拟名称。

我的 /etc/hosts 内容是:

127.0.0.1   localhost
10.1.79.116     controller
192.168.2.22    controller
192.168.2.21    compute01

更新:通过点击这些链接,我仍然遇到上面提到的问题:

https://www.linode.com/docs/security/ssl/ssl-apache2-centos
https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-httpd-secure-server.html
https://docs.openstack.org/keystone/latest/admin/identity-certificates-for-pki.html
https://docs.openstack.org/project-deploy-guide/openstack-ansible/ocata/app-advanced-config-sslcertificates.html

现在我很困惑,不知道该怎么办。任何帮助我都会很感激。

答案1

这是 Centos 软件包升级引入的一个错误(我认为是 Centos 7.4 系列)。为了解决这个问题,我们需要将“ /etc/httpd/conf.d/openstack-dashboard.conf”文件更改为:

WSGIDaemonProcess dashboard
WSGIProcessGroup dashboard
WSGISocketPrefix run/wsgi
WSGIApplicationGroup %{GLOBAL}

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>
  Options All
  AllowOverride All
  Require all granted
</Directory>

<Directory /usr/share/openstack-dashboard/static>
  Options All
  AllowOverride All
  Require all granted
</Directory>

然后重新启动 httpd systemctl restart httpd:。

缺失的物品是:WSGIApplicationGroup %{GLOBAL}

相关内容