Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
infrastructure:server:webservers_nginx_flask_drupal_etc [2017/02/28 14:22]
dolf
infrastructure:server:webservers_nginx_flask_drupal_etc [2017/02/28 14:40] (current)
dolf
Line 3: Line 3:
 We are running a number of things for the nightowl webserver. We are running a number of things for the nightowl webserver.
  
-As a main webserver we run Nginx. This receives and handles all the initial http(s) requests. +  * As a main webserver we run Nginx. This receives and handles all the initial http(s) requests. 
-Nginx with fastcgi is used to handle php (with php5-fpm) +  ​* ​Nginx with fastcgi is used to handle php (with php5-fpm) 
-gunicorn in combination with virtualenv is used to handle python wsgi webapplications. Each application runs on it's own socket. Nginx delegates all the requests to those applications using a reverse proxy (the request comes in at nginx on port 80 or 443, but nginx sends it on to another port on the same machine (127.0.0.1) where gunicorn is listening). +  ​* ​gunicorn in combination with virtualenv is used to handle python wsgi webapplications. Each application runs on it's own socket. Nginx delegates all the requests to those applications using a reverse proxy (the request comes in at nginx on port 80 or 443, but nginx sends it on to another port on the same machine (127.0.0.1) where gunicorn is listening). 
-circus is used to start the gunicorn apps, handle logging and restart them if necessary.+  ​* ​circus is used to start the gunicorn apps, handle logging and restart them if necessary.
  
 Webapplications we are running: Webapplications we are running:
-drupal with mysql for nightowl.foundationu.com +  * drupal with mysql for nightowl.foundationu.com 
-taiga (with gunicorn/​circus behind nginx) and postgresql as database+  ​* ​taiga (with gunicorn/​circus behind nginx) and postgresql ​as database, and rabbitmq and redis for async task management (optional but nice) 
 +  * rfid management application (with gunicorn/​circus behind nginx) and mysql as database
  
 ===== Installing Circus ===== ===== Installing Circus =====
Line 47: Line 48:
 PYTHONPATH=/​srv/​www/​vhosts/​rfid_test_nightowl_foundationu_com/​inventory/​venv/​lib/​python3.4/​site-packages:/​srv/​www/​vhosts/​rfid_test_nightowl_foundationu_com/​inventory/​ PYTHONPATH=/​srv/​www/​vhosts/​rfid_test_nightowl_foundationu_com/​inventory/​venv/​lib/​python3.4/​site-packages:/​srv/​www/​vhosts/​rfid_test_nightowl_foundationu_com/​inventory/​
 </​code>​ </​code>​
 +
 ===== Setting up nginx to reverse-proxy a python wsgi (gunicorn) application ===== ===== Setting up nginx to reverse-proxy a python wsgi (gunicorn) application =====
 Follow the basic setup from [[https://​www.digitalocean.com/​community/​tutorials/​how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-14-04#​configuring-nginx-to-proxy-requests|Digital Ocean]] Follow the basic setup from [[https://​www.digitalocean.com/​community/​tutorials/​how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-14-04#​configuring-nginx-to-proxy-requests|Digital Ocean]]
  but instead of using "​http://​unix:"​ for the proxy pass directive, use http://​127.0.0.1:<​portnumber>​ as you configured in circus.ini.  but instead of using "​http://​unix:"​ for the proxy pass directive, use http://​127.0.0.1:<​portnumber>​ as you configured in circus.ini.
 +
 +===== Installing and running Taiga =====
 +See https://​github.com/​taigaio/​taiga-doc/​blob/​master/​setup-production.adoc
 +