the configuration file for uwsgi is as follows
[uwsgi]
socket=/tmp/uwsgi.sock
mount=/myapp=/home/nlp/pyfoot/IF/server.py
manage-script-name=true
master=true
processes=4
threads=2
stats=127.0.0.1:9191
callable=app
daemonize = /home/nlp/pyfoot/IF/server.log
nginx configuration file is as follows
server {
listen 8000;
server_name 172.22.11.46;
access_log /home/nlp/pyfoot/IF/access.log;
error_log /home/nlp/pyfoot/IF/error.log;
location /myapp {
root /myapp;
include uwsgi_params;
uwsgi_param /home/nlp/pyfoot/IF/myapp;
uwsgi_pass unix:/tmp/uwsgi.sock;
}
run the following code
[root@localhost ~]-sharp /usr/local/nginx/sbin/nginx
[root@localhost ~]-sharp uwsgi /home/nlp/pyfoot/IF/uwsgiconfig.ini
[uWSGI] getting INI configuration from /home/nlp/pyfoot/IF/uwsgiconfig.ini
[root@localhost ~]-sharp uwsgi /home/nlp/pyfoot/IF/uwsgiconfig.ini
Log display
*** Starting uWSGI 2.0.17 (64bit) on [Thu Jun 7 16:38:04 2018] ***
compiled with version: 4.4.7 20120313 (Red Hat 4.4.7-18) on 07 June 2018 01:45:32
os: Linux-2.6.32-696.el6.x86_64 -sharp1 SMP Tue Mar 21 19:29:05 UTC 2017
nodename: localhost.localdomain
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 6
current working directory: /root
detected binary path: /usr/local/python/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
your processes number limit is 47338
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /tmp/uwsgi.sock fd 3
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Python version: 3.6.4 (default, Mar 13 2018, 11:21:39) [GCC 4.4.7 20120313 (Red Hat 4.4.7-18)]
Python main interpreter initialized at 0x26c95d0
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 416880 bytes (407 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
mounting /home/nlp/pyfoot/IF/server.py on /myapp
WSGI app 0 (mountpoint="/myapp") ready in 1 seconds on interpreter 0x26c95d0 pid: 14517 (default app)
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 14517)
spawned uWSGI worker 1 (pid: 14519, cores: 2)
spawned uWSGI worker 2 (pid: 14520, cores: 2)
spawned uWSGI worker 3 (pid: 14521, cores: 2)
spawned uWSGI worker 4 (pid: 14523, cores: 2)
*** Stats server enabled on 127.0.0.1:9191 fd: 16 ***
but typing http://172.22.11.46:8000/ in the local browser cannot be accessed. Why is this