I have a Django app working with uWSGI. My uWSGI config is:
[uwsgi]
http = 127.0.0.1:8000
env = DJANGO_SETTINGS_MODULE=my_django_app.settings
module = my_django_app.wsgi:application
home = /var/www/myapp/venv
chdir = /var/www/myapp/app
pidfile = /tmp/myapp.pid
logger = syslog
logfile-chown = True
logfile-chmod = 644
touch-logreopen = /var/www/uwsgi/log/rotate_monitor
uid = myapp
gid = myapp
master = True
vacuum = True
harakiri = 20
max-requests = 5000
processes = 4
threads = 1
post-buffering=4096
touch-reload = /var/www/myapp/conf/uwsgi.ini
route = ^/test log:someone called /test
But route directive doesn't work, I get regular uwsgi log entry. I played around it a lot, but can't find a way to make it work. Any ideas? My uWSGI version is 2.0.5.1
I had to install uWSGI with pcre support. It solved problem with routing.
To do it I had to install pcre lib(for Ubuntu the package called libpcre3) and reinstall uWSGI then. Since PCRE is already in your system uWSGI will be automatically compiled with pcre support.
There are also points from @tobias.mcnulty comment that also might be useful:
pip install -I --no-cache-dir uwsgi
to reinstall it, otherwise you might just get the same cached wheel. !!! no internal routing support, rebuild with pcre support !!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With