我正在使用cpanel设置python应用程序。我没有root访问权限。使用“设置python应用程序”功能会自动创建一个应用程序文件夹,一个virtualenv和passenger_wsgi.py。然后,我通过SSH进入我的帐户并pip install -r requirements.txt。 项目结构如下:
microblog
public(folder)
tem(folder)
app(folder)
--templates(folder)
index.html
login.html
--__init__.py
--forms.py
--models.py
--routes.py
microblog.py
config.py
passenger_wsgi.py
我在线上关注了诸如https://blog.ouseful.info/2016/09/17/creating-a-simple-python-flask-app-running-on-reclaim-hosting/之类的一些教程,将passenger_wsgi.py修改为:
from app import application
index.html正确显示,但是首页上的任何链接均返回404 not found错误。 我以前在Windows上进行过测试,没有任何问题,但是在Linux服务器上部署后,链接却死了(我认为可能是操作系统差异,但无法在线找到任何信息)。我想知道我做错了什么吗?谢谢。
问候 克莱门特(Clement)