Wrong apache configuration for openstack-dashboard

Bug #1326775 reported by James Pic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-dashboard (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Openstack-dashboard configuration sets STATIC_ROOT to /usr/share/openstack-dashboard/static and STATIC_URL to /static. This means that the Apache configuration should use /usr/share/openstack-dashboard/static and for url /static. You can check the setting value with manage.py shell:

$ /usr/share/openstack-dashboard/manage.py shell
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.conf import settings; settings.STATIC_ROOT; settings.STATIC_URL
'/usr/share/openstack-dashboard/static'
'/static/'
>>>

But /etc/apache2/conf.d/openstack-dashboard.conf uses /usr/share/openstack-dashboard/openstack_dashboard/static/ as root for url /static:

Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static/

As a result, Apache won't serve the static files directory managed by django (ie. with command manage.py collectstatic). (That static files directory managed by django can be used by rm -rf'ing the static root manually before running collectstatic to avoid problems caused by circular symlinks described in #1326734).

Revision history for this message
Matthias Runge (mrunge) wrote :

This is something, I heard on the past OpenStack Summit a few times.

Changed in openstack-dashboard (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.