nginx配置访问本地文件,和多个端口

upstream backen {
                server 127.0.0.1:6001;
                server 127.0.0.1:6002;
                server 127.0.0.1:6003;
                server 127.0.0.1:6004;
                server 127.0.0.1:6005;
        }

    server{
        listen *:80 ;
#        listen *:443 ;

        server_name  rmwatermark.xxx.com;

        location /output_img {
                root /home/ubuntu/project_data/watermark_remove;
                autoindex on;
                autoindex_exact_size off;
                autoindex_localtime on;
                charset 'utf-8';
        }


        location / {
                    proxy_pass http://backen;
                    proxy_set_header X-Real-IP $remote_addr;
                    proxy_set_header Host $host;
                    proxy_set_header X-Forwarded-Proto $scheme;
                    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                    proxy_connect_timeout 300s;
                    proxy_send_timeout 300s;
                    proxy_read_timeout 300s;
                    client_max_body_size    10m;
                    client_body_buffer_size 128k;
                    }
        }
###

}

你可能感兴趣的:(linux,linux)