플라스크, Nginx와 404 및 uwsgi,나는/python_envs/env1의 /의 VIRTUALENV와 /find_bili_user/app.py에 플라스크 응용 프로그램을 HAVA
app.py 얻기 CONFIGS :
[uwsgi]
chdir = /find_bili_user
app = app
module = %(app)
home = /python_envs/env1
pythonpath = %(chdir)
socket = %(chdir)/app_uwsgi.sock
chmod-socket = 666
callable = app
logto = /var/log/uwsgi/%n.log
processes = 4
threads = 2
및 nginx를 CONFIGS :
server {
listen 80;
charset utf-8;
client_max_body_size 75M;
location/{
include uwsgi_params;
uwsgi_pass unix:/find_bili_user/app_uwsgi.sock;
}
}
*** Starting uWSGI 2.0.13.1 (64bit) on [Tue Jun 21 08:20:59 2016] *** compiled with version: 4.8.4 on 21 June 2016 07:28:15 os: Linux-3.13.0-83-generiC#127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016 nodename: vultr.guest machine: x86_64 clock source: unix detected number of CPU cores: 1 current working directory: /find_bili_user detected binary path: /python_envs/env1/bin/uwsgi chdir() to /find_bili_user *** WARNING: you are running uWSGI without its master process manager *** your processes number limit is 5764 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 /find_bili_user/app_uwsgi.sock fd 3 Python version: 3.4.3 (default, Oct 14 2015, 20:31:36) [GCC 4.8.4] Set PythonHome to /python_envs/env1 Python main interpreter initialized at 0x21e8b30 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 332224 bytes (324 KB) for 8 cores *** Operational MODE: preforking+threaded *** added /find_bili_user/ to pythonpath. WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x21e8b30 pid: 1503 (default app) *** uWSGI is running in multiple interpreter mode *** spawned uWSGI worker 1 (pid: 1503, cores: 2) spawned uWSGI worker 2 (pid: 1505, cores: 2) spawned uWSGI worker 3 (pid: 1506, cores: 2) spawned uWSGI worker 4 (pid: 1507, cores: 2)
이
내가, IP 주소에 액세스하고 nginx를 시작 페이지를 얻을 수 있습니다 butxx.xx.xx.xx/find_bili_user.json가 오류를 반환 난의 nginx와 uwsgi를 시작할 때 123,414,, 나는 다음과 같은 로그를 얻을 수 404, 그건 nginx가 uwsgi.Is 요청을 보내지 않는 것 내 configs에 문제가 있습니까?
플라스크 파일을 표시하십시오. – polku
설정이 좋다. 정의한 유일한 경로는'/ find_bili_user.json'이므로 다른 경로에는 404가있는 것이 정상이다. 너는 무엇을 기대 했는가? – polku
/find_bili_user.json에 액세스 할 수 없다는 것을 의미하는 바뀌 었습니다. – Wuke