| ... | ... |
@@ -1,5 +1,5 @@ |
| 1 | 1 |
<VirtualHost *:80> |
| 2 |
- WSGIScriptAlias / %HORIZON_DIR%/openstack_dashboard/wsgi/django.wsgi |
|
| 2 |
+ WSGIScriptAlias %WEBROOT% %HORIZON_DIR%/openstack_dashboard/wsgi/django.wsgi |
|
| 3 | 3 |
WSGIDaemonProcess horizon user=%USER% group=%GROUP% processes=3 threads=10 home=%HORIZON_DIR% display-name=%{GROUP}
|
| 4 | 4 |
WSGIApplicationGroup %{GLOBAL}
|
| 5 | 5 |
|
| ... | ... |
@@ -8,7 +8,10 @@ |
| 8 | 8 |
WSGIProcessGroup horizon |
| 9 | 9 |
|
| 10 | 10 |
DocumentRoot %HORIZON_DIR%/.blackhole/ |
| 11 |
- Alias /media %HORIZON_DIR%/openstack_dashboard/static |
|
| 11 |
+ Alias %WEBROOT%/media %HORIZON_DIR%/openstack_dashboard/static |
|
| 12 |
+ Alias %WEBROOT%/static %HORIZON_DIR%/static |
|
| 13 |
+ |
|
| 14 |
+ RedirectMatch "^/$" "%WEBROOT%/" |
|
| 12 | 15 |
|
| 13 | 16 |
<Directory /> |
| 14 | 17 |
Options FollowSymLinks |
| ... | ... |
@@ -93,6 +93,9 @@ function init_horizon {
|
| 93 | 93 |
local local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py |
| 94 | 94 |
cp $HORIZON_SETTINGS $local_settings |
| 95 | 95 |
|
| 96 |
+ _horizon_config_set $local_settings "" WEBROOT \"$HORIZON_APACHE_ROOT/\" |
|
| 97 |
+ _horizon_config_set $local_settings "" CUSTOM_THEME_PATH \"themes/webroot\" |
|
| 98 |
+ |
|
| 96 | 99 |
_horizon_config_set $local_settings "" COMPRESS_OFFLINE True |
| 97 | 100 |
_horizon_config_set $local_settings "" OPENSTACK_KEYSTONE_DEFAULT_ROLE \"Member\" |
| 98 | 101 |
|
| ... | ... |
@@ -122,6 +125,7 @@ function init_horizon {
|
| 122 | 122 |
s,%HORIZON_DIR%,$HORIZON_DIR,g; |
| 123 | 123 |
s,%APACHE_NAME%,$APACHE_NAME,g; |
| 124 | 124 |
s,%DEST%,$DEST,g; |
| 125 |
+ s,%WEBROOT%,$HORIZON_APACHE_ROOT,g; |
|
| 125 | 126 |
\" $FILES/apache-horizon.template >$horizon_conf" |
| 126 | 127 |
|
| 127 | 128 |
if is_ubuntu; then |
| ... | ... |
@@ -1426,7 +1426,7 @@ fi |
| 1426 | 1426 |
# If you installed Horizon on this server you should be able |
| 1427 | 1427 |
# to access the site using your browser. |
| 1428 | 1428 |
if is_service_enabled horizon; then |
| 1429 |
- echo "Horizon is now available at http://$SERVICE_HOST/" |
|
| 1429 |
+ echo "Horizon is now available at http://$SERVICE_HOST$HORIZON_APACHE_ROOT" |
|
| 1430 | 1430 |
fi |
| 1431 | 1431 |
|
| 1432 | 1432 |
# If Keystone is present you can point ``nova`` cli to this server |
| ... | ... |
@@ -87,6 +87,9 @@ TEMPEST_SERVICES="" |
| 87 | 87 |
# Set the default Nova APIs to enable |
| 88 | 88 |
NOVA_ENABLED_APIS=ec2,osapi_compute,metadata |
| 89 | 89 |
|
| 90 |
+# Set the root URL for Horizon |
|
| 91 |
+HORIZON_APACHE_ROOT="/dashboard" |
|
| 92 |
+ |
|
| 90 | 93 |
# Whether to use 'dev mode' for screen windows. Dev mode works by |
| 91 | 94 |
# stuffing text into the screen windows so that a developer can use |
| 92 | 95 |
# ctrl-c, up-arrow, enter to restart the service. Starting services |