webapp is not serving static files

Posted December 18, 2020 314 views
DjangoUbuntu 20.04

urls.pyin main app

vurlpatterns = [
    path('', include('products.urls', namespace='mainapp')),
    path('', include('checkout.urls', namespace='checkout')),
    #path('accounts/', include('allauth.urls')),
    path('', include('accounts.urls')),

]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)


STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
STATIC_ROOT = os.path.join(BASE_DIR, 'static')

i am getting file not found on my website 404
i am using cyberpanel with openlightspeed server

1 comment
  • i am using *contex * for openlightspeed in cyberpanel

    context / {
      type                    appserver
      location                /home/
      binPath                 /usr/local/lsws/fcgi-bin/lswsgi
      appType                 wsgi
      startupFile             ecommerce/
      envType                 1
      env                     LS_PYTHONBIN=/home/
      env                     PYTHONHOME=/home/
Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!