我的uwsgi + nginx 配置哪里出了问题?

我用django框架在ubuntu 搭建网站。但是目前总是有问题。访问公网ip/域名都是显示nginx欢迎界面
我感觉问题应该在uwsgi.ini 或者 nginx的配置。

麻烦大家帮忙看一下配置问题在哪里?

uwsgi.ini 配置

[uwsgi]
# Django-related settings

socket = 127.0.0.1:8000

# the base directory (full path)
chdir= /home/xing/Desktop/django/
module=  /django/ecommerce.wsgi:application

# process-related settings
# master
master          = true

# maximum number of worker processes
processes       = 4

# ... with appropriate permissions - may be needed
# chmod-socket    = 664
# clear environment on exit
vacuum          = true

daemonize = /home/xing/Desktop/django/uwsgi/uwsgi_log.log

pidfile = /home/xing/Desktop/django/uwsgi/uwsgi_pid.log

nginx配置:

# mysite_nginx.conf

# the upstream component nginx needs to connect to
upstream django {
    server 127.0.0.1:8000; 
}


server {
    # the port your site will be served on
    listen      80;
    # the domain name it will serve for
    server_name www.geekpark.nl;
    charset     utf-8;

    # max upload size
    client_max_body_size 75M;   # adjust to taste

    # Django media
    location /media  {
        alias /home/xing/static/images;  
    }

    location /static {
        alias /home/xing/static; # your Django project's static files - amend as required
        expires 30d;
    }


    location / {
        uwsgi_pass  127.0.0.1:8000;
        include     uwsgi_params; # the uwsgi_params file you installed
    }
}

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐