1π
β
βThe steps presented in the question is actually correct to set the static files on apache server.β
The problem was the typo I made in my apache server thread (the correct one is: Alias /static /var/www/mysite/mysite/static
). Thanks to @Zagorodniy Olexiy for pointing it out.
π€S_M
0π
After all you wrote I think that the problem is right of the files and directories of your project. Try customize it in this way:
1) Change the rights of all files in your project:
chmod 755 /var/www/mysite/*
2) Change rights to the folders of your project:
find /var/www/mysite/ -type f -exec chmod 644 {} \;
3) Change owner of your project:
chown -R www-data:www-data /var/www/mysite/*
Also you have typo in your apache server thread:
remove
Alias /static /var/www/mysite/mysit/static
to
Alias /static /var/www/mysite/mysite/static
Hope it helps you.
- /manage.py celeryd : IndexError: list index out of range
- Query local time
- Django returns 404 after using restframework into existing project
Source:stackexchange.com