overhangio / tutor-discovery

Course Discovery plugin for Tutor
GNU Affero General Public License v3.0
12 stars 41 forks source link

Static assets not loading #2

Closed ryangadams closed 5 years ago

ryangadams commented 5 years ago

I installed discovery following the instructions on the PyPI page

When I browsed to explore the api the static assets were 404ing.

Investigation revealed the nginx config (in /etc/nginx/conf.d/extra.conf on the nginx container) had the following line:

location /static {
    alias /var/www/ecommerce/assets/;
  }

but there was no ecommerce directory in that location. Instead the assets were inside a discovery directory.

The setting should instead be:

location /static {
    alias /var/www/discovery/assets;
  }

Note the removal of the trailing slash too.

I changed this in the file in tutor_root/env/apps/nginx/extra.conf and rebuilt the container and it worked as required.

regisb commented 5 years ago

Thanks a lot @ryangadams! This will be fixed in v0.1.2.