-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nginx won't load static files. Django opens just fine #194
Comments
Hi, in the line where you configured
I'm not sure how "alias" behaves exactly, but I tested a bit and it seemed to cause trouble. |
Both media and or just static? In addition to @lfuerderer's suggestion: make sure you actually generated the static files (see the README) - so that they are there. Though I think it's only ever useful for the admin panel, so in most cases it shouldn't matter for normal operations. |
Thanks! I tried changing it to root instead, and restarted nginx...no change. Still looks unable to reach the static content, the css and the images (but the version running from port 8001 loads fine).
Yup, I did run ./manage.py collectstatic, and the files are there. /media...Should populate once I start uploading stuff calendars/contacts? I guess I didn't get to that part just yet. |
Your webserver user is probably unable to reach the directory in /home/localuser An easy way to fix this is by putting your static dir in a reachable path, maybe |
Great stuff! I think you're onto something, I"m really getting permission denied when trying to ls under www-data. I'll try to move the folders and change the location in the configs. Thanks for the help! |
Hi guys!
I'm trying to setup my nginx for the first time. Somehow...I don't get nginx to load static content. But if I open the 8001 django URL, that one works just fine. I'm sure I must be missing something incredibly obvious, but I'm at my wits end right now, after several hours trying.
So...this is my systemd service file:
this is my etebase-server.ini:
....and this is the nginx file.
Do you guys see whatever I might have missed?
Thanks a lot!
The text was updated successfully, but these errors were encountered: