Question
problem in serving static files in django webapp
urls.py
from django.contrib import admin
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
settings.py
STATIC_URL = '/web/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
STATIC_ROOT = '/home/domain.com/public_html/web/public/static'
```**
i am using cyberpanel with openlightspeed server with contex**
context / {
type appserver
location /home/domain.com/publichtml/web
binPath /usr/local/lsws/fcgi-bin/lswsgi
appType wsgi
startupFile web/wsgi.py
envType 1
env LSPYTHONBIN=/home/domain.com/publichtml/bin/pyhton
env PYTHONHOME=/home/domain.com/publichtml/
}
my web app is not serving static files i am getting
404
Not Found