美文网首页
nginx&&uwsgi配置文件

nginx&&uwsgi配置文件

作者: wildsre | 来源:发表于2016-11-20 22:09 被阅读0次

nginx configure file

# 需要使用绝对路径:将~替换成/home/youaccout(当前登入的用户)
# the upstream component nginx needs to connect to
upstream django {
    server unix:/home/zooo/uwsgi-set/mysite/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      8000;
    # the domain name it will serve for
    server_name localhost; # 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 ~/temp/uwsgi-set/mysite/media;
        autoindex on;
    }

    location /static {
        alias ~/temp/uwsgi-set/mysite/static;
    }

    # Finally, send all non-media requests to the Django server.
    location / {
        uwsgi_pass  django;
        include     ~/temp/uwsgi-set/mysite/uwsgi_params;
    }
}

mysite_uwsgi.ini

# 需要使用绝对路径:将~替换成/home/youaccout(当前登入的用户)
# mysite_uwsgi.ini file
[uwsgi]

# Django-related settings
# the base directory (full path)
chdir           = ~/temp/uwsgi-set/mysite
# Django's wsgi file
module          = mysite.wsgi
# the virtualenv (full path)
home            = ~/temp/uwsgi-set

# process-related settings
# master
master          = true
# maximum number of worker processes
processes       = 4
# the socket (use the full path to be safe
socket          = ~/temp/uwsgi-set/mysite/mysite.sock
# ... with appropriate permissions - may be needed
chmod-socket    = 666

相关文章

  • nginx&&uwsgi配置文件

    nginx configure file mysite_uwsgi.ini

  • 配置文件使用实例

    从配置文件读取内容进行实例化 读取配置文件的类 配置文件 使用配置文件

  • springboot(2)配置文件与整合其他技术

    4.配置文件: 4.1 SpringBoot配置文件类型:4.2 yml配置文件简介与语法: 4.3配置文件与...

  • URXVT

    配置文件 生成简明的配置文件 生成有详细说明的配置文件 [1] 示例配置文件 .Xresource / .X...

  • Spring Boot

    配置文件 默认配置文件:application.properties 推荐配置文件:application.yml...

  • Nginx + Uwsgi的基础配置

    Nginx 配置文件: Uwsgi配置文件:

  • linux rabbitmq 修改端口号

    查找配置文件位置: 拷贝配置文件到 /etc/rabbitmq 目录下: 修改配置文件:

  • python配置文件读取

    1、ConfigParser读取配置文件模块 配置文件 [people]为section 2、读取配置文件

  • Hexo+Next的摸索

    区分站点配置文件和主题配置文件 站点配置文件路径:blog/_config.yml主题配置文件路径:blog/th...

  • 环境变量

    环境变量配置文件 查看环境变量 set source 配置文件 等同于 . 配置文件重新读取配置文件/etc...

网友评论

      本文标题:nginx&&uwsgi配置文件

      本文链接:https://www.haomeiwen.com/subject/dlbypttx.html