错误信息:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
查看日志 cat /var/log/httpd/error_log
[Thu Jun 25 08:06:56.647747 2020] [:error] [pid 30850] [remote 192.168.52.1:80] mod_wsgi (pid=30850): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
发现问题和WSGI有关,查看文档发现自己漏了一个配置
解决:在/etc/httpd/conf.d/openstack-dashboard.conf文件里添加一行WSGIApplicationGroup %{GLOBAL}
之后还是500,再次查看日志:cat /var/log/httpd/error_log
[Thu Jun 25 08:06:56.648227 2020] [:error] [pid 30850] [remote 192.168.52.1:80] ImportError: No module named jango.contrib.sessions.backends.cache
发现是jango.contrib.sessions.backends.cache这个问题,发现官方文档里是SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
自己漏了一个d,好在没在这绕很久一眼看出来了。