While deploying django app on production environment in openlitespeed server, static files and media files not found. App is woking fine in development environment in local, but after uploading it to server, static content and media files are not accessible.
I have updated my static url as follow:
STATIC_URL = '/public/static/'
STATIC_ROOT = '/home/domain.com/app/public/static'
Where app is the project location. I am getting 404 for error for all static and media files:
Failed to load resource: the server responded with a status of 404 ()
When I try collectstatic
I am getting following error on terminal:
django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.
I tried many options, none of the options worked. Any solution will be highly appreciated