nginx & gridfs

        location /pics/ {

            gridfs gridfs   field=filename     type=string;
            mongo 192.168.51.103:27002;
        }

        location /pic/ {
           proxy_set_header Host  $host;
           proxy_set_header X-Forwarded-For  $remote_addr;
           proxy_buffer_size 16k;
           proxy_buffers 4 64k;
           proxy_pass http://mongo/pics/;
            proxy_set_header       Host $host;
            proxy_cache            STATIC;
            proxy_cache_valid      200  1d;
            proxy_cache_use_stale  error timeout invalid_header updating    http_500 http_502 http_503 http_504;
        }

你可能感兴趣的:(运维)