Deploying a Flask app to hosting at godaddy

后端 未结 2 1150
甜味超标
甜味超标 2021-02-06 18:58

I am using Python/Flask Microframework. (http://flask.pocoo.org/) to build a small app. Tested the app locally and deployed it to godaddy and there i am seeing "ERROR 400&q

相关标签:
2条回答
  • 2021-02-06 19:24

    Being on a shared environment means that you will most likely need to use CGI to deploy:

    http://flask.pocoo.org/docs/deploying/cgi/

    On shared webhosting, though, you might not have access to your Apache config. In this case, a file called .htaccess, sitting in the public directory you want your app to be available, works too but the ScriptAlias directive won’t work in that case:

    RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f # Don't interfere with static files RewriteRule ^(.*)$ /path/to/the/application.cgi/$1 [L]

    0 讨论(0)
  • 2021-02-06 19:24

    It is a bit tricky. I am starting a cPanel Deluxe account. The only way I have found is to install Python 3.x and then install virtualenv, and then use pip install requirements.txt to install what I need

    0 讨论(0)
提交回复
热议问题