title: root Flask app route hits 403 forbidden in production (nginx, uwsgi)
body: <p>Basically I have a single views.py with all my routes in it. They all work great on production except for one... the homepage at the root location '/'</p>
  
  <p><strong>from views.py</strong></p>
  
  <pre><code>@app.route('/', methods = ['GET'])
  def homepage():
  
      return render_template("/client/homepage.html")
  
  @app.route('/admin/', methods = ['GET'])
  @login_required
  def admin():
  
      submissions = Campaign.query.all()
  
      return render_template("admin.html",
          title = 'Admin',
          submissions = submissions)
  </code></pre>
  
  <p>Instead of displaying the page, I get a 403 forbidden message.</p>
  
  <p>From the nginx logs:</p>
  
  <blockquote>
    <p>directory index of "/srv/www/cc/app/" is forbidden</p>
  </blockquote>
  
  <p>Anyone know what's wrong with my flask route which would cause this change in behavior from '/admin/' to '/'?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I've found multiple posts online about this issue, and one of the suggestions was to turn autoindex on within nginx. I did this, and it gave me a directory of the root location... which makes me think that the issue may be that nginx simply isn't passing the request to uwsgi. But i'm not sure what to do about that.</p>