nginx-FAQ


# 修改源码src/http/modules/ngx_http_autoindex_module.c

#define NGX_HTTP_AUTOINDEX_PREALLOCATE 50
#define NGX_HTTP_AUTOINDEX_NAME_LEN 50

现象 浏览器报错 502

# nginx 日志报错 connect() failed 
2024/03/22 14:19:50 [error] 21#21: *3669 connect() failed (113: No route to host) while connecting to upstream, client: 172.19.0.1, server: , request: "GET /article/2024/3/20/2149.html HTTP/1.1", upstream: "http://172.19.0.2:8000/article/2024/3/20/2149.html", host: "www.aicda.fun"

原因

nginx 服务不能连接后段服务

解决办法

关闭防火墙

浏览器报错

The Cross-Origin-Opener-Policy header has been ignored, because the URL's origin was untrustworthy. It was defined either in the final response or a redirect. Please deliver the response using the HTTPS protocol. You can also use the 'localhost' origin instead. See https://www.w3.org/TR/powerful-features/#potentially-trustworthy-origin and https://html.spec.whatwg.org/#the-cross-origin-opener-policy-header.