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 '/'
from views.py
@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)
Instead of displaying the page, I get a 403 forbidden message.
From the nginx logs:
directory index of "/srv/www/cc/app/" is forbidden
Anyone know what's wrong with my flask route which would cause this change in behavior from '/admin/' to '/'?
EDIT
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.