内部代理用户访问图片问题解决
2013-01-24 11:43
267 查看
外部网友访问论坛时,所有图片都不显示,提示错误:[code=CACHE_FILL_OPEN_FILE] An internal error prevented the object from being sent to the client and cached. Try again later.
该网友是集团局域网代理上网,访问其他网站都能够正常,只是我们站图片有问题公司有一批旧图片是放到windows服务器的windows服务器上的图片都能够正常访问
最近在做虚拟化,可能是虚拟机的问题?分别访问虚拟机和物理机上的图片链接,都不行可以排除这个问题
windows服务器直接用apache提供服务,linux用nginx那可能是配置的问题
拿一台测试服务器,把线上的nginx配置逐步测试nginx的基本配置 client_max_body_size 500m; client_header_buffer_size 256k; sendfile on; keepalive_timeout 65;网友访问正常
加上压缩的配置 gzip on; gzip_buffers 4 16k; gzip_comp_level 9; gzip_min_length 1k; gzip_proxied any; gzip_types text/plain application/x-javascript js gzjs text/css text/javascript image/jpeg image/gif image/png;网友访问出错,提示[code=CACHE_FILL_OPEN_FILE] An internal error prevented the object from being sent to the client and cached. Try again later.
把上面代理的配置去掉,加上 sendfile on; keepalive_timeout 300; fastcgi_buffers 8 256k; fastcgi_buffer_size 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300;访问也正常
因为该网友是内部代理上网,那可能是压缩的代理问题注释#gzip_proxied any;重启nginx,访问能够正常
再把线上所有#gzip_proxied any;的配置都注释掉,OK,能够正常访问论坛了晕,就是这个问题
查看nginx wikigzip_proxied:off - disables compression for all proxied requests
expired - enables compression, if the "Expires" header prevents caching
no-cache - enables compression if "Cache-Control" header is set to "no-cache"
no-store - enables compression if "Cache-Control" header is set to "no-store"
private - enables compression if "Cache-Control" header is set to "private"
no_last_modified - enables compression if "Last-Modified" isn't set
no_etag - enables compression if there is no "ETag" header
auth - enables compression if there is an "Authorization" header
any - enables compression for all requests
gzip_proxied any;一直理解的,应该是“所有的请求都进行压缩”,怎么到了这里,代理的请求被禁止了呢?
真心不明白,难道是nginx的一个bug?纪录一下
本文出自 “lynnteng0” 博客,请务必保留此出处http://lynnteng0.blog.51cto.com/2145094/1125375
该网友是集团局域网代理上网,访问其他网站都能够正常,只是我们站图片有问题公司有一批旧图片是放到windows服务器的windows服务器上的图片都能够正常访问
最近在做虚拟化,可能是虚拟机的问题?分别访问虚拟机和物理机上的图片链接,都不行可以排除这个问题
windows服务器直接用apache提供服务,linux用nginx那可能是配置的问题
拿一台测试服务器,把线上的nginx配置逐步测试nginx的基本配置 client_max_body_size 500m; client_header_buffer_size 256k; sendfile on; keepalive_timeout 65;网友访问正常
加上压缩的配置 gzip on; gzip_buffers 4 16k; gzip_comp_level 9; gzip_min_length 1k; gzip_proxied any; gzip_types text/plain application/x-javascript js gzjs text/css text/javascript image/jpeg image/gif image/png;网友访问出错,提示[code=CACHE_FILL_OPEN_FILE] An internal error prevented the object from being sent to the client and cached. Try again later.
把上面代理的配置去掉,加上 sendfile on; keepalive_timeout 300; fastcgi_buffers 8 256k; fastcgi_buffer_size 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300;访问也正常
因为该网友是内部代理上网,那可能是压缩的代理问题注释#gzip_proxied any;重启nginx,访问能够正常
再把线上所有#gzip_proxied any;的配置都注释掉,OK,能够正常访问论坛了晕,就是这个问题
查看nginx wikigzip_proxied:off - disables compression for all proxied requests
expired - enables compression, if the "Expires" header prevents caching
no-cache - enables compression if "Cache-Control" header is set to "no-cache"
no-store - enables compression if "Cache-Control" header is set to "no-store"
private - enables compression if "Cache-Control" header is set to "private"
no_last_modified - enables compression if "Last-Modified" isn't set
no_etag - enables compression if there is no "ETag" header
auth - enables compression if there is an "Authorization" header
any - enables compression for all requests
gzip_proxied any;一直理解的,应该是“所有的请求都进行压缩”,怎么到了这里,代理的请求被禁止了呢?
真心不明白,难道是nginx的一个bug?纪录一下
本文出自 “lynnteng0” 博客,请务必保留此出处http://lynnteng0.blog.51cto.com/2145094/1125375
相关文章推荐
- 解决内网用户不能正常访问内部WEB服务器问题
- 解决内网用户不能正常访问内部WEB服务器问题 推荐
- Nginx解决代理冲突问题图片访问不出来的问题
- 解决内网用户不能正常访问内部WEB服务器问题
- 解决内网用户不能正常访问内部WEB服务器问题
- 解决内网用户不能正常访问内部WEB服务器问题
- 解决内网用户不能正常访问内部WEB服务器问题
- 解决内网用户不能正常访问内部WEB服务器问题
- 解决jsp页面路径访问图片的乱码问题
- 解决 Cisco ASA 内网用户不能通过域名访问内网web问题!
- 当网站有用户访问时,重启Tomcat,报Serializable session的问题解决方法
- 利用代理页面解决html iframe跨域访问网站问题
- 一步一步SharePoint 2007之十九:解决实现注册用户后,自动具备访问网站的权限的问题(1)——配置Provider
- win7问题解决,凭据管理器和无法访问,不允许一个用户使用一个以上用户名与服务器或共享资源进行多重连接。
- 用统一加速器解决网通用户访问博客园速度慢的问题
- win7问题解决,凭据管理器和无法访问,不允许一个用户使用一个以上用户名与服务器或共享资源进行多重连接。
- SQLServer 数据库变成单个用户后无法访问问题的解决方法[在手动还原该数据库的时候,设置为单用户模式,然后其他用户访问的时候就。。。。]
- weblogic通过代理插件weblogic.servlet.proxy.HttpProxyServlet跨域访问导致session丢失问题的解决
- 解决ftp限制用户访问上层目录后无法登陆问题
- 一步一步SharePoint 2007之十九:解决实现注册用户后,自动具备访问网站的权限的问题(1)——配置Provider