Question

webapp is not serving static files

Posted December 18, 2020 118 views
DjangoUbuntu 20.04

urls.pyin main app

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

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

**
settings.py**

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/domain.com/public_html/fl
      binPath                 /usr/local/lsws/fcgi-bin/lswsgi
      appType                 wsgi
      startupFile             ecommerce/wsgi.py
      envType                 1
      env                     LS_PYTHONBIN=/home/domain.com/public_html/bin/pyhton
      env                     PYTHONHOME=/home/domain.com/public_html/
    }
    
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!