Based on Ubuntu 14.04 LTS x86_64

Install and Configure OpenStack Dashboard Service (Horizon)

on controller node or any hosts that running dashboard:

aptitude -y install apache2 memcached libapache2-mod-wsgi openstack-dashboard

aptitude -y remove --purge openstack-dashboard-ubuntu-theme

vi /etc/openstack-dashboard/local_settings.py

#ALLOWED_HOSTS = ['horizon.example.com', ]

ALLOWED_HOSTS = '*'

OPENSTACK_HOST = "controller"

TIME_ZONE = "Asia/Shanghai"

# no space on left side for CACHES

CACHES = {

   'default': {
       'BACKEND' : 'django.core.cache.backends.memcached.MemcachedCache',
       'LOCATION' : '127.0.0.1:11211',
   }
}
#CACHES = {
#    'default': {
#        'BACKEND' : 'django.core.cache.backends.locmem.LocMemCache'
#    }
#}

vi /etc/apache2/apache2.conf

ServerName controller:80

service apache2 restart

service memcached restart

on anything hosts, login with (vi /etc/hosts to add items)

To use HTTPS:

cd /etc/ssl/private

# Generate private key
openssl genrsa -out server.key 2048
# Generate CSR
openssl req -new -days 3650 -key server.key -out server.csr

Common Name: controller

# Generate Self Signed Key
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
vi /etc/apache2/sites-available/default-ssl.conf
SSLCertificateFile  /etc/ssl/private/server.crt
SSLCertificateKeyFile  /etc/ssl/private/server.key
a2ensite default-ssl
a2enmod ssl
a2enmod rewrite
vi /etc/apache2/sites-available/000-default.conf

or

vi /etc/apache2/conf-available/openstack-dashboard.conf

# add inside the VirtualHost section

<VirtualHost *:80>

  RewriteEngine On
  RewriteCond %{SERVER_PORT} ^80$
  RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

</VirtualHost>

service apache2 restart

and

service memcached restart

now login to will redirect to