Guest User

Untitled

a guest
Apr 21st, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. server {
  2. listen 80;
  3. //中略
  4.  
  5. location /hoge {
  6. include uwsgi_params;
  7. uwsgi_pass unix:/var/run/uwsgi/app/app.sock;
  8. }
  9.  
  10. [uwsgi]
  11. uid = nginx
  12. gid = nginx
  13. socket = /var/run/uwsgi/app/app.sock
  14. chmod-socket = 777
  15. chdir = /var/www/中略/hoge/
  16. callable = application
  17. wsgi-file = /var/www/中略/hoge/hoge.py
  18.  
  19. def application(environ, start_response):
  20. start_response('200 OK', [('Content-type', 'text/html')])
  21. return "<html><head><title>Test</title></head><body><div>Hello</div></body></hetml>"
  22.  
  23. $ uwsgi --ini hoge.ini
  24.  
  25. [uWSGI] getting INI configuration from uwsgi.ini
  26. *** Starting uWSGI 2.0.17 (64bit) ***
  27. //中略
  28. current working directory: /var/www/中略/hoge
  29. detected binary path: /usr/bin/uwsgi
  30. !!! no internal routing support, rebuild with pcre support !!!
  31. chdir() to /var/www/中略/hoge/
  32. *** WARNING: you are running uWSGI without its master process manager ***
  33. //中略
  34. lock engine: pthread robust mutexes
  35. thunder lock: disabled (you can enable it with --thunder-lock)
  36. uwsgi socket 0 bound to UNIX address /var/run/uwsgi/app/app.sock fd 3
  37. Python version: 3.6.4
  38. *** Python threads support is disabled. You can enable it with --enable-threads ***
  39. //中略
  40. *** Operational MODE: single process ***
  41. WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0xe8e200 pid: 27939 (default app)
  42. *** uWSGI is running in multiple interpreter mode ***
  43. spawned uWSGI worker 1 (and the only) (pid: 27939, cores: 1)
  44. [pid: 27939|app: 0|req: 1/1] IPアドレス () {44 vars in 883 bytes} [日時] GET /hoge/hoge.py => generated 0 bytes in 0 msecs (HTTP/1.1 200) 1 headers in 44 bytes (75 switches on core 0)
  45. [pid: 27939|app: 0|req: 2/2] IPアドレス () {44 vars in 883 bytes} [日時] GET /hoge/hoge.py => generated 0 bytes in 0 msecs (HTTP/1.1 200) 1 headers in 44 bytes (75 switches on core 0)
  46.  
  47. return b'<html><body>Hello, world</body></html>'
Add Comment
Please, Sign In to add comment