i'm running django mod_wsgi with apache2 on GCP VM instance and when i run it on DEBUG=False the static files work fine but media files is geting 404 when i check them while clearly the files are present on the server . my conf is based on the following django doc https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/modwsgi/#serving-files
#settings.py
MEDIA_ROOT = os.path.join(PROJECT_ROOT, "media")
MEDIA_URL = os.environ.get("MEDIA_URL", "/media/")
STATIC_ROOT = os.path.join(PROJECT_ROOT, "static")
STATIC_URL = os.environ.get("STATIC_URL", "/static/")
#apache2
Alias /media/ /home/ubuntu/myshop/media/
Alias /static/ /home/ubuntu/myshop/static/
<Directory /home/ubuntu/myshop/media>
Require all granted
</Directory>
<Directory /home/ubuntu/myshop/static>
Require all granted
</Directory>
tried restarting apache2 and even the server but didnt work either