404 error when requesting a file that exists

I'm trying to deploy a Django project using a VPS - it uses Apache and mod_wsgi. (It works fine locally). My homepage is displayed, but no static file is found, leading to a goofy display.

I have configured my static files this way :

settings.py :

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

urls.py

urlpatterns = [
    path('', home, name='home'),
    path('output/<str:region>/<str:summoner_name>', output, name='output')
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

call in template :

home.html

After that I ran collectstatic, which created a "static" folder on root, as expected. I have checked via SSH and FTP, it is there : see here, with the correct permissions. The URL to access it should then be : mywebsiteurl/static.

But I get this 404 error, even though my explorer seems to look for the correct adress :

errors

I simply don't understand how can I get a 404 when requesting a file that seems to exist.

Back to Top