Programmingjoe
Programmingjoe

Reputation: 2249

nginx - Failing to load images only, loading css and js

So I setup nginx and uwsgi using this tutorial: http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

I finished the tutorial completely but for some reason only my images are not being loaded on the page when I run the command...

uwsgi --ini exchange_uwsgi.ini

where exchange_uwsgi.ini is my initialization file for specifying what socket I run on, wheres my project, wheres my virtualenv etc...

Just to re-iterate, the only things not showing up are my images and my images and css are all stored in one folder.

Any reason why this might happens?

Thanks

Upvotes: 0

Views: 3337

Answers (1)

Programmingjoe
Programmingjoe

Reputation: 2249

I fixed the problem.

Make sure to check the permissions on all of your static files. Only 2 images of mine were not loading and they were the only ones with incorrect permissions.

On Linux, first go to the folder with all your static files in the command window, type "ls -l" for list items with the long parameter so you can view permissions.

I set my permission on each file to -rw-rw-r--

Edit: In order to change permissions look into the command "chmod"

Upvotes: 3

Related Questions