So I was trying to get uWSGI and nginx working together and wanted to set the following command line to automatically execute and start my uWSGI background service:
uwsgi --master --processes 4 --die-on-term --uid uwsgi --gid nginx --socket /tmp/uwsgi.sock --chmod-socket --stats :1717 --no-site --vhost --logto /var/log/uwsgi.log
When using systemd I thought the only thing I'd need to do was using ExecStart=
and starting that command. But since systemd needs absolute paths I take a look in the default uWSGI start script and saw that /usr/bin/uwsgi
or usr/sbin/uwsgi
would be the default start path.
So the final exec command for me looks something like this:
ExecStart=/usr/bin/uwsgi --master --processes 4 --die-on-term --uid uwsgi --gid nginx --socket /tmp/uwsgi.sock --chmod-socket --stats :1717 --no-site --vhost --logto /var/log/uwsgi.log
The Problem: When running this it's unable to find the option --no-site
for running everything in a virtualenv.
When starting this with uwsgi
in the command line it's not a problem.
But even when starting /usr/bin/uwsgi
directly from the command line I get this error.
So to me it looks like the uwsgi
command isn't just running /usr/bin/uwsgi
directly. But I'm not sure what I need to do to get this working.
I'd really appreciate any help I can get.