# 启动进程,通常设置成和cpu的数量相等，我这里就启动2个
worker_processes 2;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /data/smartchart/smartcharts/log/Nginx_access_main.log  main;

    sendfile            on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include           mime.types;
    default_type      application/octet-stream;


    server {
        #这里是访问时用到的端口
        listen       80;
        server_name  0.0.0.0;


        charset UTF-8;
        #这块存日志文件
        access_log  /data/smartchart/smartcharts/log/Nginx_access.log;
        error_log   /data/smartchart/smartcharts/log/Nginx_error.log;

        client_max_body_size 75M;
        location /static/ {
            alias /data/smartchart/smartcharts/static/;
        }
        location /media/ {
            alias /data/smartchart/smartcharts/media/;
         }
        location / {
                include uwsgi_params;
                #同uwsgi内容
                uwsgi_pass 127.0.0.1:8000;
        }
    }  

}
