[FEAT] Default site returns 200 for unknown paths, so nginx-botsearch never matches
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
調査の方向性
まずサンプル設定 default.conf を見つけ、その try_files ディレクティブを確認してください。デフォルトのサイトが / をどのように配信するか、提案された =404 フォールバックがその動作を維持するかを確認してください。不明なパスが404を返し、/ が引き続きランディングページを配信すれば完了です。issueにはテストが指定されていないため、サンプル設定で両方のケースを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Is this a new feature request?
- I have searched the existing issues
Wanted change
Hi,
the default site should return 404 for paths that don't exist. Right now it falls back to /index.html and returns 200 for everything.
Reason for change
I wondered why fail2ban never banned the scanners hitting my server. The nginx-botsearch jail only matches requests with a 404:
failregex = ^<HOST> \- \S+ \[\] \"(GET|POST|HEAD) \/<block> \S+\" 404 .+$
But the default site has
try_files $uri $uri/ /index.html /index.htm /index.php$is_args$args;
so every unknown path gets the landing page with 200:
"GET /.ssh/id_rsa HTTP/1.1" 200 1345 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
"GET /%2egitconfig HTTP/2.0" 200 1345 "-" "curl/8.7.1"
In my access log that happened 5282 times, and the jail matched only 21 of 373440 lines. My default.conf is the unchanged sample (2026/03/07).
Proposed code change
try_files $uri $uri/ =404;
/ still shows the index.html. If the fallback is there on purpose (php apps in /config/www), maybe add a comment in the sample that nginx-botsearch doesn't work for the default site then.
- 主要言語
- Dockerfile
- スター
- 3.8k
- フォーク
- 274
- 平均マージ
- 25分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
linuxserver/docker-swag のほかの issue
-
難易度 4/5 1〜2日 初心者へのやさしさ 25/100
linuxserver/docker-swag#636 · コメント 1 件 ·
-
[BUG] Anonymous Authelia redirects can overwrite a newer login session対応中かも @MeiXu6693 が 21 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
linuxserver/docker-swag#634 · コメント 1 件 ·
-
no-issue-activity
難易度 4/5 1〜2日 初心者へのやさしさ 25/100
linuxserver/docker-swag#630 · コメント 3 件 ·
-
[BUG] "chmod: changing permissions of '/XXX': Bad address" error message (QNAP)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug upstream issue work-in-progress
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
linuxserver/docker-swag#514 · コメント 75 件 ·
-
awaiting-approval
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
linuxserver/docker-swag#276 · コメント 7 件 · リアクション 6 件 ·
linuxserver/docker-swag の issue をすべて見る
似ている issue
-
area: doc-engine area: infrastructure bug community-request
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
snapotter-hq/SnapOtter#4834 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
soroswap/token-list#125 ·
メンテナーはふだん 1 日以内に返信
-
enhancement roadmap: next
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nekko-labs/nekko-agent#2998 ·
メンテナーはふだん 1 日以内に返信