您现在的位置是:亿华云 > 应用开发

都是Nginx前缀惹的祸,FastDFS不能访问了!

亿华云2025-10-09 01:30:44【应用开发】6人已围观

简介复制upstreamfile{ server192.168.175.110:80max_fails=3; } server{

都是Nginx前缀惹的祸,FastDFS不能访问了!
复制upstream file {       server 192.168.175.110:80 max_fails=3;  }  server {       listen       80;      server_name  192.168.175.101;       location / {     root   html;    indexindex.html index.htm;    #允许cros跨域访问     add_header Access-Control-Allow-Origin*;    #proxy_redirect default;    #跟代理服务器连接的前缀超时时间,必须留意这个timeout时间不能超过75秒,源码库访问当一台服务器当掉时,前缀过10秒转发到另外一台服务器。云服务器提供商访问前缀    proxy_connect_timeout 10;       }     location ~/file {    add_header Access-Control-Allow-Origin*;   add_header Access-Control-Allow-Credentialstrue;   proxy_pass                  http://file;   proxy_set_header Host $host:$server_port;     }  }  1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.

很赞哦!(8736)