Notes tagged with "Uwsgi"

Web Application Setup - uWSGI Set Up

Set Up uWSGI To Server Your Application

  1. Create your uWSGI configuration file:

    ... touch /var/www/appname/config/uwsgi-appname.ini
    
  2. Contents of your uwsgi-appname.ini should look like this:

    [uwsgi]
    
    plugins = python3,logfile
    
    chdir = /var/www/appname
    home = /var/www/appname/venv
    wsgi-file = /var/www/appname/wsgi.py
    
    master = True 
    cheap = True
    idle = 600
    die-on-idle = True
    manage-script-name = True
    
  3. Link your config file so uwsgi can find it:

    ... cd /etc/uwsgi/apps-enabled
    ... ln -s /var/www/appname/config/uwsgi-appname.ini appname.ini
    

SYSTEMD UWSGI SET UP

  1. Create systemd socket and server files for your uwsgi app: