我试图在运行带有Nginx和uwsgi的Debian 9的远程服务器上设置Wagtail。我正在使用此指南:https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-debian-8。我的服务器没有防火墙。但是,当我访问http://72.14.181.145/的站点时,仅看到消息“内部服务器错误”。如何查看调试/错误信息? /var/log/nginx/error.log
中没有任何内容...
在/etc/nginx/sites-enabled/my_site
中,我有这个:
server {
listen 80;
server_name 72.14.181.145 li44-145.members.linode.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/myusername/my_site;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/my_site.sock;
error_log /var/log/nginx/error.log;
}
}
error.log
为空。
这是uwsgi --http :8080 --home /home/myusername/Env/my_site --chdir /home/myusername/my_site -w my_site.wsgi
的输出:
*** Starting uWSGI 2.0.17.1 (64bit) on [Mon Jul 30 14:41:53 2018] ***
compiled with version: 6.3.0 20170516 on 29 July 2018 21:47:39
os: Linux-4.9.0-7-amd64 #1 SMP Debian 4.9.110-1 (2018-07-05)
nodename: sandbox
machine: x86_64
clock source: unix
detected number of CPU cores: 1
current working directory: /home/myusername
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /home/myusername/my_site
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 3898
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 http bound on :8080 fd 4
spawned uWSGI http 1 (pid: 20358)
uwsgi socket 0 bound to TCP address 127.0.0.1:45939 (port auto-assigned) fd 3
Python version: 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118]
Set PythonHome to /home/myusername/Env/my_site
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x55c1438a1920
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72904 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
ImportError: No module named 'my_site'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 20357, cores: 1)