是哪里配置的不对吗,折腾了好久,等大佬帮忙~
# the upstream component nginx needs to connect to
upstream django {
server unix:///home/lee/code/toyinstagram/bookmarks/mysite.sock; # for a file socket
# server 127.0.0.1:8001; # for a web port socket (we'll use this first)
}
# configuration of the server
server {
# the port your site will be served on
listen 9310;
# the domain name it will serve for
server_name 127.0.0.1; # substitute your machine's IP address or FQDN
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias /home/lee/code/toyinstagram/bookmarks/media; # your Django project's media files - amend as required
}
location /static {
alias /home/lee/code/toyinstagram/bookmarks/account/static; # your Django project's static files - amend as required
}
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass django;
include /home/lee/code/toyinstagram/bookmarks/uwsgi_params; # the uwsgi_params file you installed
}
}
uWSGI
[uwsgi]
http = :9310
# the local unix socket file than commnuincate to Nginx
socket = /home/lee/code/toyinstagram/bookmarks/mysite.sock
# the base directory (full path)
chdir = /home/lee/code/toyinstagram/bookmarks
# Django's wsgi file
wsgi-file = bookmarks/wsgi.py
# maximum number of worker processes
processes = 4
#thread numbers startched in each worker process
threads = 2
#monitor uwsgi status
stats = 127.0.0.1:9191
# clear environment on exit
vacuum = true
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.