修改nginx.conf 配置默认在/etc/nginx
在linux 上面可以通过  find / -name  "nginx.conf"

user root root;
worker_processes  1;
worker_priority	0;


pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


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

    log_format access '$remote_addr - $remote_user [$time_local] "$request" '
                     '$status $body_bytes_sent "$http_referer" '
                     '"$http_user_agent" "$http_x_forwarded_for"';
    access_log /dev/null;
    sendfile        on;
    client_max_body_size 500m;

    keepalive_timeout  200; # 设置长连接超时时间为 60 秒
    proxy_read_timeout 200; # 连接成功后_等候后端服务器响应时间_其实已经进入后端的排队之中等候处理(也可以说是后端服务器处理请求的时间)

server {
        listen       10000;
        server_name  localhost;

        location / {
            root /nginx/html/compressor-video-ui;
            try_files $uri /index.html index.html;
        }
        location /systemApi/ {
            proxy_pass http://127.0.0.1:11000/;
        }
        location /files {
            if ($request_uri ~* ^/.*[?&]download=([^&]*)) {
                add_header Content-Disposition 'attachment; filename=$1';  
            }

            alias /link/unzip/;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }

}

更多推荐