Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- //中略
- location /hoge {
- include uwsgi_params;
- uwsgi_pass unix:/var/run/uwsgi/app/app.sock;
- }
- [uwsgi]
- uid = nginx
- gid = nginx
- socket = /var/run/uwsgi/app/app.sock
- chmod-socket = 777
- chdir = /var/www/中略/hoge/
- callable = application
- wsgi-file = /var/www/中略/hoge/hoge.py
- def application(environ, start_response):
- start_response('200 OK', [('Content-type', 'text/html')])
- return "<html><head><title>Test</title></head><body><div>Hello</div></body></hetml>"
- $ uwsgi --ini hoge.ini
- [uWSGI] getting INI configuration from uwsgi.ini
- *** Starting uWSGI 2.0.17 (64bit) ***
- //中略
- current working directory: /var/www/中略/hoge
- detected binary path: /usr/bin/uwsgi
- !!! no internal routing support, rebuild with pcre support !!!
- chdir() to /var/www/中略/hoge/
- *** WARNING: you are running uWSGI without its master process manager ***
- //中略
- lock engine: pthread robust mutexes
- thunder lock: disabled (you can enable it with --thunder-lock)
- uwsgi socket 0 bound to UNIX address /var/run/uwsgi/app/app.sock fd 3
- Python version: 3.6.4
- *** Python threads support is disabled. You can enable it with --enable-threads ***
- //中略
- *** Operational MODE: single process ***
- WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0xe8e200 pid: 27939 (default app)
- *** uWSGI is running in multiple interpreter mode ***
- spawned uWSGI worker 1 (and the only) (pid: 27939, cores: 1)
- [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)
- [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)
- return b'<html><body>Hello, world</body></html>'
Add Comment
Please, Sign In to add comment