title: Amazon EBS Django 404 Error. The requested URL / was not found on this server
body: <p>So I finally finished my project, creating dads website, and followed these instructions to deploy it to ebs:
  <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html</a></p>
  
  <p>However, when I go to <a href="http://django-env.ethmrbkmgd.us-east-1.elasticbeanstalk.com/" rel="nofollow noreferrer">http://django-env.ethmrbkmgd.us-east-1.elasticbeanstalk.com/</a> I get the error:
         The requested URL / was not found on this server.</p>
  
  <p>On my local server the website runs perfectly. After researching I discovered that people said it had to do with trailing back slashes in urls.py but this seemed to not fix it. Another person recommended to change allowed hosts to ALLOWED_HOSTS = ['*'] but that has not work either. Here is my project layout</p>
  
  <pre><code>suliman_baldo
  
  bin
  include
  lib
  media_cdn
  src
     .ebextensions
         django.config
     .elasticbeanstalk
         config.yml
     gallery
     main
     static
     suliman_baldo
         settings.py
         urls.py
     requirements.txt
  </code></pre>
  
  <p>My urls.py file is </p>
  
  <pre><code>from django.conf.urls import include, url
  from django.contrib import admin
  from main import views 
  
  
  from django.conf.urls.static import static #testing
  from django.conf import settings
  from django.conf.urls import patterns
  
  
  urlpatterns = [
      # Examples:
      # url(r'^$', 'suliman_baldo.views.home', name='home'),
      # url(r'^blog/', include('blog.urls')),
  
      url(r'^admin/', include(admin.site.urls)),
      url(r'^$', "main.views.home"),
      url(r'^index/', "main.views.home"),
  
      url(r'^aboutme/', "main.views.aboutme"),    
      url(r'^publications/', "main.views.publications"),    
      url(r'^archive/', "main.views.archive"),   
      url(r'^gallary', include('gallery.urls')),    
      url(r'^filer/', include('filer.urls')),
  
  
  ]
  
  if settings.DEBUG:
      urlpatterns +=  static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) 
      urlpatterns +=  static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  </code></pre>
  
  <p>Here are the config files </p>
  
  <p>django.config</p>
  
  <pre><code>option_settings:
    aws:elasticbeanstalk:container:python:
      WSGIPath: src/wsgi.py
  </code></pre>
  
  <p>config.yml</p>
  
  <pre><code>branch-defaults:
    default:
      environment: django-env
  environment-defaults:
    django-env:
      branch: null
      repository: null
  global:
    application_name: suliman_baldo
    branch: null
    default_ec2_keyname: aws-eb
    default_platform: Python 2.7
    default_region: us-east-1
    profile: eb-cli
    repository: null
    sc: null
  </code></pre>