Nginx and Python
Silvio Siefke
siefke_listen at web.de
Mon Jan 21 17:54:00 UTC 2013
Hello,
i try for a tutorial Python / Django and Nginx unite.
http://www.collabspot.com/2012/08/14/setting-up-nginx-uwsgi-python-ubuntu-12-04/
That sounds like a multi-hosting, and was not particularly difficult. But
something is wrong with the system.
When i want on the website, i become a 502 Bad Gateway. The Socket
would not be create.
Configuration:
<vhost>
gentoo-mobile conf # cat nginx.conf
server {
listen 80;
server_name python.silviosiefke.de;
root /var/www/python.silviosiefke.de/src/silviosiefke;
access_log /var/www/python.silviosiefke.de/logs/access.log;
error_log /var/www/python.silviosiefke.de/logs/error.log;
location / {
include /etc/nginx/configuration/uwsgi_params;
uwsgi_pass unix:///tmp/python.silviosiefke.de.sock;
}
}
<uwsgi>
gentoo-mobile conf # cat uwsgi.ini
[uwsgi]
# variables
projectname = silviosiefke
projectdomain = python.silviosiefke.de
base = /var/www/python.silviosiefke.de
# config
protocol = uwsgi
venv = /var/www/python.silviosiefke.de/venv
pythonpath = /var/www/python.silviosiefke.de/src/silviosiefke
module = %(projectname).wsgi
socket = /tmp/python.silviosiefke.de.sock
logto = /var/www/python.silviosiefke.de/logs/uwsgi.log
<log>
2013/01/21 18:50:17 [crit] 4539#0: *1 connect() to
unix:///tmp/python.silviosiefke.de.sock failed (2: No such file or directory)
while connecting to upstream, client: 192.168.2.20,
server: python.silviosiefke.de, request: "GET /favicon.ico HTTP/1.1",
upstream: "uwsgi://unix:///tmp/python.silviosiefke.de.sock:",
: "python.silviosiefke.de"
The socket is not present in /tmp. Whereis the mistake?
Is there no way to make the Vhost configuration so that it does not
matter what the user is in? PHP, Perl or Python?
Really Thank you for help. Greetings
Silvio
More information about the nginx
mailing list