Change openstack-dashboard document root from /dashboard to /
27 Apr 2015The default entry for OpenStack Dashboard is
http://example.com/dashboard.
If you would like to avoid the subpath, here are two methods.
Modify the configuration
Sometimes we want this direct url for OpenStack dashboard: http://example.com/, not http://example.com/dashboard/
To change openstack-dashboard login url from /dashboard to / run the following steps:
-
Edit /etc/httpd/conf.d/openstack-dashboard.conf
Change
WSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgiinto
WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi -
Edit /etc/openstack-dashboard/local_settings
Add the following lines:
LOGIN_URL = '/auth/login/' LOGOUT_URL = '/auth/logout/' LOGIN_REDIRECT_URL = '/' - restart apache2 service
Use Apache redirect
Another way to accomplish this is using redirect in Apache. This method is preferred for me.
Edit /etc/httpd/conf.d/openstack-dashboard.conf
RedirectMatch ^/$ http://www.example.com/dashboardPlease note that the following would not work correctly:
Redirect / https://www.example.com/dashboard/Because it will also redirect all sub paths, not only ”/“.