mking / flask-uwsgi Goto Github PK
View Code? Open in Web Editor NEWTutorial for setting up Flask with uWSGI + Nginx
Tutorial for setting up Flask with uWSGI + Nginx
Hello dude, just a minor nitpick. You have accidently switched the file names in the "Creating an Upstart service for uWSGI" section:
Next, create the **init script**.
Copy the init script template to /etc/init/flask-uwsgi.conf.
Replace /path/to/flask-uwsgi with the path to this directory.
Next, create the **config file**.
Copy the config template to /etc/flask-uwsgi/flask-uwsgi.ini.
Set uid and gid to the numeric uid and gid for www-data.
Thanks for a good tutorial!
After creating and configuring the files, when i started the service flask-uwsgi :
sudo service flask-uwsgi start
I found some thing wrong with it.
In /var/log/flask-uwsgi/flask-uwsgi.log
'''
*** Starting uWSGI 2.0.10 (32bit) on [Wed Jun 24 12:52:11 2015] ***
compiled with version: 4.8.4 on 24 June 2015 12:42:55
os: Linux-3.13.0-55-generic #92-Ubuntu SMP Sun Jun 14 18:33:09 UTC 2015
nodename: iZ94xmv8p4cZ
machine: i686
clock source: unix
detected number of CPU cores: 1
current working directory: /home/shellmode/foodfun
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
uWSGI running as root, you can use --uid/--gid/--chroot options
setgid() to 1000
setuid() to 1000
your processes number limit is 7861
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /var/run/flask-uwsgi/flask-uwsgi.sock fd 6
Python version: 2.7.6 (default, Mar 22 2014, 23:03:14) [GCC 4.8.2]
Set PythonHome to venv
ImportError: No module named site
'''
And to find the status of service flask-uwsgi :
sudo service flask-uwsgi status
The result is :
'''
flask-uwsgi stop/waiting
'''
flask-uwsgi should not be started correctly
Is there any ImportError?
But in other py file or python shell, i can import module site
Hope for your response, thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.