title: Django can upload files to /media/ but gives 404 in production
body: <p>I just looked at others threads such as <a href="https://stackoverflow.com/questions/22329686/can-upload-django-media-cant-retrieve">Can upload Django media, can&#39;t retrieve</a> but I did not find the answer to my question. I also followed <a href="https://docs.djangoproject.com/fr/1.9/howto/deployment/wsgi/modwsgi/" rel="nofollow noreferrer">https://docs.djangoproject.com/fr/1.9/howto/deployment/wsgi/modwsgi/</a> without any success...</p>
  
  <p>I just passed my website from development to production and since then, every uploaded files is providing a 404 mistakes when I try to access it from webpages. The strange thing is that they are all in the /media/ folders on the servers, therefore I am able to upload them without trouble. </p>
  
  <p>What is wrong in my configuration ?</p>
  
  <p><strong>settings.py</strong></p>
  
  <pre><code># Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 
  
  # Media Files (Uploaded pictures, etc)
  MEDIA_URL = '/media/'
  MEDIA_ROOT = os.path.join(BASE_DIR,'upload')
  </code></pre>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>urlpatterns = [
  ...    
  ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  </code></pre>
  
  <p><strong>apache2/sites-enabled/*.conf</strong></p>
  
  <pre><code>Alias /media/ /var/www/SIS/media/
  &lt;Directory /var/www/SIS/media/&gt;
       Require all granted
  &lt;/Directory&gt;
  </code></pre>
  
  <p>It only affect the /media/ folders, all static files are served well.</p>
  
  <p>Many thanks !</p>