A
A
Alexander Fadeev2015-06-25 17:41:05
Nginx
Alexander Fadeev, 2015-06-25 17:41:05

Is there a complete nginx+gunicorn/uwsgi+flask instruction somewhere with some additions?

The crux of the matter is as follows. I'm an advanced beginner in setting up servers. I do not understand everything, but in general I am guided.
Interested in the following assembly:
0. There are many domains. Each in its own folder at /var/www/$domain
1. Nginx - issuing static and redirecting dynamics to gunicorn/uwsgi. Here, an additional task in the absence of a dynamic python application in the domain folder is to give static index.html. Or if the domain looks like dev.domain.com redirect to the specified path like /var/www/domain.com/dev/
2. Gunicorn/uWSGi processing and issuing dynamics from python applications. Here the question is, what is better to install gunicorn vs uWSGi? The projects are small, the load is expected to be medium. Mainly on flask
3. Flask application
+ virtualenv for each project with package config (I mean build.sh with requirements.conf dependencies)
Here is such a canoe. Tell me, please, some sensible instructions and guides that are understandable to a not very well-versed person, where, if possible, not only commands were written, but at least approximately explained what was happening.
Already googled to hell. I seem to understand, I seem to do it right, but from time to time it’s not right there, then it’s not like that. Lots of customization options everywhere. I tried to follow this guide: habrahabr.ru/post/159575/#nginx But here is django. It doesn't matter to someone, but it's already more difficult for me ... =\ And as a result, I screwed up something wrong.
Please don't growl. I wouldn't ask unless it's really necessary. Brains are already fading. I'm a designer though, not an administrator. But there is no way to delegate this task now. =(
PS: OS: Ubuntu 14.04

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2015-06-25
@sim3x

This mana provides for isolation of projects through users with the location of projects in /home and not in /var/www
https://www.digitalocean.com/community/tutorials/h...
You can also install uWSGI globally, not on a per-project basis
Preferably in tirant mode

P
Puma Thailand, 2015-06-25
@opium

And what is the difference between running a flask or Django? You run a python, not a framework

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question