nginx默认配置不友好

问答中心分类: Linuxnginx默认配置不友好
猛哥 asked 6 年 ago
在nginx默认配置中,file cache都是开放的。
我在做人脸识别时,发现无法获取到最新照片,有时显示不全,有时完全不显示,在网上查相关现象也查不到,导致我卸载nginx换了apache,今天才找到,导致我还要换回去,白白浪费了两天。
我觉得这个配置默认打开太不合理了。

2 Answers
oneinstack answered 6 年 ago
后续考虑去掉,暂时请修改/usr/local/nginx/conf/nginx.conf

  ##If you have a lot of static files to serve through Nginx then caching of the files' metadata (not the actual files' contents) can save some latency.
  #open_file_cache max=1000 inactive=20s;
  #open_file_cache_valid 30s;
  #open_file_cache_min_uses 2;
  #open_file_cache_errors on;