Netbox: Static Media Failure

Created on 8 Jul 2020  路  2Comments  路  Source: netbox-community/netbox

Environment

  • Python version: 3.6.8
  • NetBox version: v2.8.7

Steps to Reproduce

  1. Linux CentOS 7.8
  2. Follow the steps provided in https://netbox.readthedocs.io/en/stable/installation/
  3. Install nginx as web server and configure a vhost with ssl
  4. 4.

Make sure nginx is serving the static directory

location /static/ {
alias /opt/netbox/netbox/static/;
}

Expected Behavior

Open the page without any problem

Observed Behavior

When I try to access the application I got the message below:

Static Media Failure
The following static media file failed to load: css/base.css
Check the following:

manage.py collectstatic was run during the most recent upgrade. This installs the most recent iteration of each static file into the static root path.
The HTTP service (e.g. Nginx or Apache) is configured to serve files from the STATIC_ROOT path. Refer to the installation documentation for further guidance.
STATIC_URL: /static/
The file css/base.css exists in the static root directory and is readable by the HTTP process.
Click here to attempt loading NetBox again.

After some tests, I changed the owner and group from root to nginx in /opt/netbox recursively. And even this way I'm getting the error. I just open the page successfully when I change the user to root in /etc/nginx/ngxin.conf file.

Most helpful comment

Same issue for me, I hope to see an answer...

All 2 comments

Same issue for me, I hope to see an answer...

Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided here. For general discussion, questions, or assistance with installation issues, please post to our mailing list instead.

Was this page helpful?
0 / 5 - 0 ratings