1
Conantv2 2023-11-22 09:07:33 +08:00
这是 nginx 配置问题吧,nginx 返回了 301 啊,location 是不是你旧网址
|
2
knva 2023-11-22 09:10:47 +08:00
301 到哪了也不说。
|
3
paranoiagu OP |
4
paranoiagu OP 直接 curl 我的 ip 没问题。套 cf 就完蛋。
|
5
Conantv2 2023-11-22 09:26:10 +08:00
@paranoiagu 不要只 curl ip ,要带上域名
|
6
paranoiagu OP @Conantv2 带上了,不知道这样带上对不对。
curl -v -k https://xxx.xxx.xxx.xxx/ -H "Host: xxx.xxx.cf" * Trying xxx.xxx.xxx.xxx:443... * Connected to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) port 443 (#0) * ALPN: offers h2,http/1.1 * TLSv1.3 (OUT), TLS handshake, Client hello (1): * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.3 (OUT), TLS handshake, Client hello (1): * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): * TLSv1.3 (IN), TLS handshake, Certificate (11): * TLSv1.3 (IN), TLS handshake, CERT verify (15): * TLSv1.3 (IN), TLS handshake, Finished (20): * TLSv1.3 (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 * ALPN: server accepted h2 * Server certificate: * subject: CN=*.yp-hq.cf * start date: Nov 20 09:10:38 2023 GMT * expire date: Feb 18 09:10:37 2024 GMT * issuer: C=US; O=Let's Encrypt; CN=R3 * SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. * using HTTP/2 * h2h3 [:method: GET] * h2h3 [:path: /] * h2h3 [:scheme: https] * h2h3 [:authority: xxx.xxx.cf] * h2h3 [user-agent: curl/7.88.1] * h2h3 [accept: */*] * Using Stream ID: 1 (easy handle 0x563df52ebc80) > GET / HTTP/2 > Host: xxx.xxx.cf > user-agent: curl/7.88.1 > accept: */* > * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * old SSL session ID is stale, removing < HTTP/2 200 < server: nginx < date: Wed, 22 Nov 2023 00:59:34 GMT < content-type: text/html < strict-transport-security: max-age=31536000; includeSubDomains; preload < <html> <head><title>Index of /</title></head> <body> <h1>Index of /</h1><hr><pre><a href="../">../</a> </pre><hr></body> </html> * Connection #0 to host xxx.xxx.xxx.xxx left intact |
7
Conantv2 2023-11-22 09:32:00 +08:00
这么看,直接访问倒不会 301 ,你看下日志吧,可能是日志带了某个参数触发的 301
|
8
paranoiagu OP @Conantv2 我也感觉是 nginx 的问题了。我再研究一下,谢谢。
|
9
mcV473b9u4GfJG81 2023-11-22 10:21:58 +08:00
为什么我托管的网页 由 full strict 改为 flexible 才能正常打开
|
10
kingwrcy 2023-11-22 10:29:09 +08:00
full strict 是 cf 到你的源站 也是 https,要求你的源站支持 https.
flexible 是 cf 到你的源站是 http 你源站域名没有 https 的话,需要改成 flexible. 不然就是无限 301 |
11
rockxsj 2023-11-22 12:54:47 +08:00
配置问题,我套了
|