linux浏览器无法访问master,nginx uwsgi配置成功运行后,浏览器无法访问,求大佬指点...

uwsgi的配置文件 如下

[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配置文件如下

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;

}

运行如下代码

[root@localhost ~]# /usr/local/nginx/sbin/nginx

[root@localhost ~]# uwsgi /home/nlp/pyfoot/IF/uwsgiconfig.ini

[uWSGI] getting INI configuration from /home/nlp/pyfoot/IF/uwsgiconfig.ini

[root@localhost ~]# uwsgi /home/nlp/pyfoot/IF/uwsgiconfig.ini

日志显示

*** 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 #1 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 ***

但是在本机浏览器输入http://172.22.11.46:8000/却无法访问,请问这是为何

bVbb0zY?w=952&h=195

73bccf0c0b4af35beddca4274520fb45.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值