Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. /var/www/mysite
  2. |-- mysite
  3. | +-- templates/
  4. | +-- static/
  5. | +--__init__.py
  6. +-- uwsgi.ini
  7.  
  8. [uwsgi]
  9. chdir = /var/www/mysite/
  10. socket = /tmp/mysite.sock
  11. module = mysite
  12. callable = app
  13. vacuum = True
  14. uid = www-data
  15. gid = www-data
  16.  
  17. server {
  18. listen 80 default_server;
  19. listen [::]:80 default_server;
  20.  
  21. root /var/www/html;
  22. index index.html index.htm;
  23. server_name _;
  24.  
  25. location / { try_files $uri @mysite; }
  26. location @mysite {
  27. include uwsgi_params;
  28. uwsgi_pass unix:///tmp/mysite.sock;
  29. }
  30. }
  31.  
  32. [Unit]
  33. Description=uWSGI Emperor
  34. After=syslog.target
  35.  
  36. [Service]
  37. ExecStart=/usr/bin/uwsgi --ini /etc/uwsgi/emperor.ini
  38. # Requires systemd version 211 or newer
  39. RuntimeDirectory=uwsgi
  40. Restart=always
  41. KillSignal=SIGQUIT
  42. Type=notify
  43. StandardError=syslog
  44. NotifyAccess=all
  45.  
  46. [Install]
  47. WantedBy=multi-user.target
  48.  
  49. [uwsgi]
  50. emperor = /etc/uwsgi/vassals
  51. uid = www-data
  52. gid = www-data
  53.  
  54. 2016/02/09 17:45:01 [error] 1708#0: *304 upstream prematurely closed connection while reading response header from upstream, client: 123.123.123.123, server: _, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///tmp/mysite.sock:", host: "mysite.domain"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement