citruspi
citruspi

Reputation: 6891

Deploying Flask on VPS

I currently have a LAMP stack on a Linode VPS.

My server is set up with apache2, and then in /etc/apache2/sites-available I have a list of site vhosts.

Example:

<VirtualHost *:80>
     ServerAdmin [email protected]
     ServerName domain.com
     ServerAlias www.domain.com
     DocumentRoot /folder/www/domain.com/public_html/
     ErrorLog /folder/www/domain.com/logs/error.log
     CustomLog /folderx/www/domain.com/logs/access.log combined
</VirtualHost>

I'm primarily a PHP developer, but I'm trying to get into Python with Flask.

As per the instructions here, I'm installed mod_wsgi. But, I'm a little confused as to how to do the rest. Create the wsgi file, create a new Flask application, etc.

Are there any good tutorials, or could someone please help me out?

Upvotes: 0

Views: 2678

Answers (1)

Graham Dumpleton
Graham Dumpleton

Reputation: 58523

How about:

http://flask.pocoo.org/docs/quickstart/#quickstart

http://flask.pocoo.org/docs/tutorial/#tutorial

http://flask.pocoo.org/docs/deploying/mod_wsgi/#creating-a-wsgi-file

If this stuff is all really new to you, you should not worry about mod_wsgi initially and just use the builtin development server of Flask and play with it on your own local box. This is not PHP. You do not need to install Apache just to be able to do stuff.

Upvotes: 2

Related Questions