为什么 nginx 返回 200 状态代码?

为什么 nginx 返回 200 状态代码?

我有两台服务器(测试和生产),nginx配置相同,CMS joomla。

在测试服务器上一切正常。出于某种原因,产品返回了 200 代码,而它应该是 404。

如何发现错误?

➜  ~ curl -H 'Cache-Control: no-cache, no-store' -I https://test.deps.ua/katalog/oborudovanie-pon-geponn.%20html
HTTP/2 404
server: nginx/1.10.3
date: Thu, 28 Jul 2022 10:49:33 GMT
content-type: text/html; charset=UTF-8
set-cookie: d04b7eaa3f3b6344d737bae5331348b8=f50eos82svvrkh6c6754tu2c8n; path=/; secure; HttpOnly
set-cookie: ff2b532d426255db1d4ba5d72c0fcf9c=uk-UA; expires=Fri, 28-Jul-2023 10:49:32 GMT; Max-Age=31536000; path=/; secure; HttpOnly

➜  ~ curl -H 'Cache-Control: no-cache, no-store' -I https://deps.ua/katalog/oborudovanie-pon-geponn.%20html
HTTP/2 200
server: nginx/1.10.3
date: Thu, 28 Jul 2022 11:01:54 GMT
content-type: text/html; charset=utf-8
set-cookie: d04b7eaa3f3b6344d737bae5331348b8=v2fungvs0r4lslgu1qokjg64ct; path=/; HttpOnly
set-cookie: ff2b532d426255db1d4ba5d72c0fcf9c=ru-RU; expires=Fri, 28-Jul-2023 11:01:51 GMT; Max-Age=31536000; path=/; HttpOnly
permissions-policy: interest-cohort=()
expires: Wed, 17 Aug 2005 00:00:00 GMT
last-modified: Thu, 28 Jul 2022 11:01:54 GMT
cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
pragma: no-cache
strict-transport-security: max-age=31536000;
content-security-policy-report-only: default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:; report-uri /csp-report
x-content-type-options: nosniff

相关内容