请大家帮帮我!
我在 nginx 和 gunicorn 中使用我现有的 python 项目部署 MkDocs 有一个问题。
问题是:
If I use python run.py it's working fine, but I use supervisor gunicorn it's not work.
Python脚本:
docs = os.path.join(os.path.dirname(os.path.abspath(__file__)), "site")
@app.route('/app/docs/', methods=['GET'])
@app.route('/app/docs/<path:path>', methods=['GET'], defaults={'path': None})
@app.route('/app/docs/<path:path>', methods=['GET'])
def static_proxy(path=''):
if path[-3:] not in ['css', '.js', 'png']:
path = os.path.join(path,'index.html')
return send_from_directory(docs, path)
请问有什么帮助吗?