Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Https for Horizon

My OS is Ubuntu 14.04 and Apache version is Apache/2.4.7. Openstack version is Icehouse.

I am trying to enable https for Openstack Dashboard using self signed certificates.

I have followed this guide on configuring Apache: http://docs.openstack.org/icehouse/config-reference/content/configure-dashboard.html#dashboard-config-https

Following this guide leads to 2 errors:

First there is something wrong with redirection. Connecting to http://mysserver/horizon (The index page of Horizon service) gets redirected to https://myserverhorizon. The slash between servername and page name is missing.

If I manually enter the correct address (https://myserver/horizon) I get warning about my self signed cert. So it seems that certificates are ok.

After accepting my certificate I get Apache error page:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

I get same error for static index page at document root so it seems that Apache has totally ceased functioning.

/var/log/apache2/error.log has errors like this:

 [Thu Jul 23 15:27:20.918036 2015] [:error] [pid 21996:tid 139772346193664] [remote myip:7760]     SECRET_KEY = secret_key.generate_or_read_from_file('/var/lib/openstack-dashboard/secret_key')
     [Thu Jul 23 15:27:20.918052 2015] [:error] [pid 21996:tid 139772346193664] [remote myip:7760]   File "/usr/lib/python2.7/dist-packages/horizon/utils/secret_key.py", line 55, in generate_or_read_from_file
     [Thu Jul 23 15:27:20.918105 2015] [:error] [pid 21996:tid 139772346193664] [remote myip:7760]     with lock:
    [Thu Jul 23 15:27:20.918119 2015] [:error] [pid 21996:tid 139772346193664] [remote myip:7760]   File "/usr/lib/python2.7/dist-packages/lockfile.py", line 223, in __enter__
[Thu Jul 23 15:27:20.918266 2015] [:error] [pid 21996:tid 139772346193664] [remote myip:7760]     self.acquire()
[Thu Jul 23 15:27:20.918281 2015] [:error] [pid 21996:tid 139772346193664] [remote myip:7760]   File "/usr/lib/python2.7/dist-packages/lockfile.py", line 239, in acquire
[Thu Jul 23 15:27:20.918299 2015] [:error] [pid 21996:tid 139772346193664] [remote myip:7760]     raise LockFailed("failed to create %s" % self.unique_name)
[Thu Jul 23 15:27:20.918322 2015] [:error] [pid 21996:tid 139772346193664] [remote myip:7760] LockFailed: failed to create /var/lib/openstack-dashboard/fsd25.MainThread-21996
[Thu Jul 23 15:27:22.531077 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760] mod_wsgi (pid=21998): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
[Thu Jul 23 15:27:22.531156 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760] Traceback (most recent call last):
[Thu Jul 23 15:27:22.531181 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 187, in __call__
[Thu Jul 23 15:27:22.531296 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]     self.load_middleware()
[Thu Jul 23 15:27:22.531314 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 44, in load_middleware
[Thu Jul 23 15:27:22.531434 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]     for middleware_path in settings.MIDDLEWARE_CLASSES:
[Thu Jul 23 15:27:22.531451 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 54, in __getattr__
[Thu Jul 23 15:27:22.531541 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]     self._setup(name)
[Thu Jul 23 15:27:22.531556 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 49, in _setup
[Thu Jul 23 15:27:22.531581 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]     self._wrapped = Settings(settings_module)
[Thu Jul 23 15:27:22.531593 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 128, in __init__
[Thu Jul 23 15:27:22.531609 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]     mod = importlib.import_module(self.SETTINGS_MODULE)
[Thu Jul 23 15:27:22.531620 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]   File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
[Thu Jul 23 15:27:22.531672 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]     __import__(name)
[Thu Jul 23 15:27:22.531686 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/settings.py", line 220, in <module>
[Thu Jul 23 15:27:22.531780 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]     from local.local_settings import *  # noqa
[Thu Jul 23 15:27:22.531795 2015] [:error] [pid 21998:tid 139772346193664] [remote myip:7760]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/local/local_settings.py", line 96, in <module>

What can I do to fix this error?