<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09/08/2015 11:56 AM, Matt Gushee
wrote:<br>
</div>
<blockquote
cite="mid:CABrD0ednFt-XJCo3ibBhhF0Z4mrN7sagMKAcp1oWN5c9LSBezA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>Hi, Tiger--<br>
<br>
</div>
I used to run a Flask site with nginx & uwsgi; I can't
recall any major issues with deployment. That site is not
currently up, but I'll see if I can find the configs.
Meanwhile, this is just to let you know that it *should* work.
IMHO.<br>
</div>
</div>
</blockquote>
<br>
hope you can post a working solution - we made progress by also
looking at Bottle docs and now don't have server errors but Flask
app domain is reverting to the Apache page and not running the flask
app - that would indicated a virtual host issue but a static html
page shows up fine on this domain - maybe a port issue ?? - maybe
the Flask app not running ?? maybe version conflicts (used latest
Deb 8 for python (2.7x) , mod-wsgi and pip install Flask). After 4
days, have run out of ideas to try. <br>
<br>
I realize there are variables (Apache vs Nginx, Debian vs Ubuntu vs
RedHat, standalone vs virtual hosts) but should be easy enough to
have working examples of these most typical deployments) <br>
<br>
Flask was really great for developing our site - now if we can only
get it deployed (: <br>
<br>
<br>
<blockquote
cite="mid:CABrD0ednFt-XJCo3ibBhhF0Z4mrN7sagMKAcp1oWN5c9LSBezA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
--<br>
</div>
Matt Gushee<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sat, Sep 5, 2015 at 10:22 PM,
tigernassau <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:tigernassau@gmail.com" target="_blank">tigernassau@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Not sure
whether it's an issue with docs or even a bug in wsgi -
what should be a 30 minute task is turning into 3 days!<br>
<br>
Although deploying the simple flask hello world example to a
standard server should be a really basic task, good step by
step docs are really lacking - we couldn't find a single
specific working example and many other people reporting
trouble on stackoverflow are dissed without solutions. The
<a moz-do-not-send="true" href="http://pocoo.org"
rel="noreferrer" target="_blank">pocoo.org</a> docs do not
show a working complete example - this is making using Flask
really difficult to use compared to other frameworks. Can
we turn this example into some good step by step docs.<br>
<br>
we first tried nginx w/ uwsgi but this failed big time -
somehow nginx is caching the non-working nginx.conf with
uwsgi and couldn't clear it or even reset the server - so
purged nginx and moved to Apache<br>
<br>
while apache is working fine for serving several other
static sites with virtual hosts, the following flask app is
failing on Apache - it's also caching some process so even
after removing the app conf file in sites-enabled, we cannot
restart the server - apparently some process is running that
we cannot find or kill and requiring the whole server to
come down. something is seriously wrong here - not sure
what the hell wsgi is doing.<br>
<br>
ourproject.py<br>
from flask import Flask<br>
app = Flask(__name__)<br>
@app.route('/')<br>
def hello():<br>
return '<h1>Hello</h1>'<br>
if __name__ == "__main__":<br>
app.run(debug=True, host='127.0.0.1',port='8040')<br>
<br>
ourproject.wsgi<br>
# wsgi file<br>
import os, sys<br>
sys.path.insert(0,"var/www/ourproject")<br>
from ourproject import app as application<br>
<br>
<br>
# ourproject.conf<br>
<VirtualHost *:80><br>
ServerName <a moz-do-not-send="true"
href="http://ourproject.com" rel="noreferrer"
target="_blank">ourproject.com</a><br>
ServerAlias <a moz-do-not-send="true"
href="http://www.ourproject.com" rel="noreferrer"
target="_blank">www.ourproject.com</a><br>
DocumentRoot /var/www/ourproject/<br>
ErrorLog /var/www/ourproject/logs/error.log<br>
CustomLog /var/www/ourproject/logs/access.log combined<br>
<br>
WSGIDaemonProcess ourproject user=www-data group=www-data
threads=5<br>
WSGIScriptAlias / /var/www/ourproject/ourproject.wsgi<br>
<br>
<Directory /var/www/ourproject><br>
WSGIProcessGroup ourproject<br>
WSGIApplicationGroup %{GLOBAL}<br>
Order allow, deny<br>
Allow from all<br>
</Directory><br>
<br>
Alias /static /var/www/ourproject/static<br>
</VirtualHost><br>
<br>
** not sure what %{GLOBAL} should be<br>
<br>
1,1 Top<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
-- <br>
Tiger Nassau, Inc.<br>
<a moz-do-not-send="true"
href="http://www.tigernassau.com" rel="noreferrer"
target="_blank">www.tigernassau.com</a><br>
<br>
_______________________________________________<br>
Flask mailing list<br>
<a moz-do-not-send="true" href="mailto:Flask@python.org"
target="_blank">Flask@python.org</a><br>
<a moz-do-not-send="true"
href="https://mail.python.org/mailman/listinfo/flask"
rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/flask</a><br>
</font></span></blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Flask mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Flask@python.org">Flask@python.org</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/flask">https://mail.python.org/mailman/listinfo/flask</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Tiger Nassau, Inc.
<a class="moz-txt-link-abbreviated" href="http://www.tigernassau.com">www.tigernassau.com</a></pre>
</body>
</html>