-
NetBox versionv3.0.6 Python version3.9 Steps to Reproduce
Expected BehaviorSee boarding login page. Observed BehaviorUnformatted page and after you enter user and password data you are redirected to Static Media Failure page. On NGINX sees following log: 2021/10/08 19:34:16 [error] 21819#21819: *2942 open() "/opt/netbox/netbox/static/netbox-print.css" failed (2: No such file or directory), client: ::ffff:192.168.0.2, server: fqdn, request: "GET /static/netbox-print.css HTTP/1.1", host: "fqdn", referrer: "https://fqdn/login/?next=/media-failure/%3Ffilename%3Dnetbox-print.css" But if you try directly bypassing NGINX you have the same result. Instead if you use start gunicorn via CLI it works. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I have solved. |
Beta Was this translation helpful? Give feedback.
I have solved.
For reference you have to perform following commands:
chown -R nginx media
chown -R nginx static
Where nginx is the user used by nginx service (if you have another change with appropriate), instead if you want to user the system account netbox you have to change properly /etc/nginx/nginx.conf change the directive user with netbox instead of nginx.
Nginx configuration provided works only on direct server where netbox is installed because it needs access to /opt/netbox/netbox/media and static, so if you have a remote NGINX you have to configure this one as NGINX reverse proxy that point to nginx socket configure on netbox server.
I hope that is useful.