Ssl

證書的 CN 和虛擬名稱的 Httpd 配置錯誤

  • August 4, 2018

我在 CentOS7 上部署了 openstack,每個服務和模組都部署得很好。

但是當我鍵入http://<controller-ip>/dashboard時,幾分鐘後,出現錯誤消息 500 "Internal Server Error"。我檢查/var/log/httpd/error_log並看到錯誤消息是:

$$ Mon Oct 09 10:05:55.743509 2017 $$ $$ :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

現在我很困惑,我不知道該怎麼辦。任何幫助,將不勝感激。

這是 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}

引用自:https://serverfault.com/questions/877544