How To Deploy a Python Flask Application with Apache and mod_wsgi

preview_player
Показать описание
How To Deploy a Python Flask Application with Apache and mod_wsgi

0)
Install apache and mode_wsgi
=========================
#sudo apt-get install apache2
#sudo apt-get install libapache2-mod-wsgi

1)
Clone the project
==================
#cd /usr/share
#cd openstack_horizon_reg_service

2)
Create Virtualenv
====================
#sudo virtualenv venv
#source venv/bin/activate

3)
Create wsgi file
==================
#sudo mkdir wsgi
#cd wsgi
import os
import sys

##Virtualenv Settings
execfile(activate_this, dict(__file__=activate_this))

##Replace the standard out

##Create appilcation for our app

4)
Apache Settings
=================
#cd /etc/apache2/conf-enabled

WSGIScriptReloading On

Directory /usr/share/openstack_horizon_reg_service/wsgi
Order allow,deny
Allow from all
Directory

4a)
#Include generic snippets of statements.
#Following line should be there
IncludeOptional conf-enabled/*.conf

5)
Restart apache
===============
#sudo service apache2 restart

6)
Рекомендации по теме
Комментарии
Автор

What changes should I do to make it run with python3

xomeluha
Автор

Thanks, got me thinking oftrying similar!

davesolzt
Автор

Hi Saju, I have developed an app too. But I don't know how to deploy on a shared server 1. I have a domain name and hosting at "Bigrock" what are steps to do so? I work on a windows machine so that is a big pain!

dean
Автор

Thank you man, it did work like a charm :D

Andrew-jqlb