z atef
z atef

Reputation: 7689

Deploying a Flask app to hosting at godaddy

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" when going to the URL. I called their tech support and they are saying the app will need index.html page and that their platform does not support python. Here is where I am loading the pages.

mAIN.PY

FYI, it runs in Amazon EC2.

Upvotes: 3

Views: 13703

Answers (2)

Rodolfo Alvarez
Rodolfo Alvarez

Reputation: 1000

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

Upvotes: 0

feathj
feathj

Reputation: 3069

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]

Upvotes: 4

Related Questions