Reputation: 5648
I'm trying to setup a webserver with nginx
, uwsgi
and django
.
nginx
works and it serves the files in /srv
just like I intended to. However I can't get uwsgi
to work properly. My biggest problem is that I used this tutorial and they don't seem to use the version of uwsgi
that I use.
At one point they call uwsgi --http :8000 --wsgi-file test.py
, but my uwsgi
has neither the --http
long option, nor --wsgi-file
long option. uwsgi --version
prints 2.0.7-debian
.
What can I call instead of --wsgi-file
?
UPDATE:
This works fine, i.e. I can see my website on localhost on port 8000:
python3 manage.py runserver 0.0.0.0:8000
However this does not:
uwsgi --http :8000 --module django_test.wsgi
It will complain, that it doesn't know the long option --http
as well as the long option --module
. It all seems to boil down to uwsgi, which on my machine just doesn't behave as it does everywhere else.
Upvotes: 2
Views: 4269
Reputation: 20539
uWSGI installed from debian packages doesn't have any built-in plugins, and for that parameters to work, you will need:
--http
parameter--module
(or any wsgi related) parameterYou can fix this in 2 ways: installing all required plugins (uwsgi-plugins-all
package will install all available plugins on debian) and loading them explicitly (--plugin http
and --plugin python
) or by replacing uWSGI by fully featured one (sudo pip install uwsgi
will do that). Second solution will tie your uWSGI up to certain python version, for first one, you can just load another python plugin (python3
for example).
Upvotes: 3