secure-linux-web-hosting
Use when setting up, hardening, or reviewing a cloud server for self-hosting, including DNS, SSH, firewalls, Nginx, static-site hosting, reverse-proxying an app, HTTPS with Let's Encrypt or ACME clients, safe HTTP-to-HTTPS redirects, or optional post-launch network tuning such as BBR.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o secure-linux-web-hosting.zip https://jpskill.com/download/21189.zip && unzip -o secure-linux-web-hosting.zip && rm secure-linux-web-hosting.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/21189.zip -OutFile "$d\secure-linux-web-hosting.zip"; Expand-Archive "$d\secure-linux-web-hosting.zip" -DestinationPath $d -Force; ri "$d\secure-linux-web-hosting.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
secure-linux-web-hosting.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
secure-linux-web-hostingフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 5
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[スキル名] secure-linux-web-hosting
安全な Linux ウェブホスティング
概要
このスキルは、古いディストリビューション固有の知識や、Debian-10 時代の古いチュートリアルに頼ることなく、クラウドサーバーを安全にアクセス可能なウェブホストに変えるために使用します。
このスキルは、初心者向けのサーバーガイドの親しみやすい学習曲線を取り入れつつ、それを再利用可能なオペレーターワークフローに変換します。
- 取り込みとルーティング
- 前提条件
- 安全なアクセス
- ファイアウォールと公開
- ウェブサーバーのセットアップ
- 静的サイトまたはアプリプロキシ
- HTTPS
- 検証
- オプションの高度なチューニング
実行可能なコマンドを提示する前に、ディストリビューションファミリーを特定し、ユーザーのディストリビューションと選択されたツールに関する公式ドキュメントと照合して、現在のパッケージ名、サービスユニット、設定パス、ACME クライアントのガイダンスを確認してください。
まず、フェーズの順序については references/workflow-map.md を開き、次に必要なより詳細なリファレンスファイルを開いてください。
使用するタイミング
ユーザーが以下のいずれかに言及した場合に、このスキルを使用してください。
- ホスティングに使用したいクラウドサーバー、VM、droplet、またはその他の Linux ホスト
- ドメインまたは DNS A/AAAA レコードをサーバーに接続すること
- SSH ログイン、SSH 強化、root ログイン、キー、ポート、またはファイアウォール設定
- ウェブサイト用の Nginx のインストールまたは設定
- Linux からのシンプルな静的サイトの提供
- 小規模なアプリをリバースプロキシとして Nginx の背後に配置すること
- HTTPS、Let's Encrypt、Certbot、
acme.sh、証明書の更新、または HTTP から HTTPS へのリダイレクト - BBR などのオプションのセットアップ後のパフォーマンスまたはネットワークチューニング
以下の目的には、このスキルを使用しないでください。
- Kubernetes、PaaS、または完全なコンテナオーケストレーターのデプロイ設計
- Linux ホスティングが実際の問題ではない、アプリケーション固有のビルドまたは CI/CD の質問
- Windows または macOS ホストの管理
- より広範な SRE またはプラットフォーム設計の扱いが必要な、パブリックなマルチテナント本番環境アーキテクチャレビュー
ワークフロー
1. 現在の状態を取り込み、分類する
まず、以下を特定します。
- ディストリビューションファミリーまたはイメージ名
- ユーザーが root アクセス、管理者ユーザー、または単一のライブ SSH セッションのみを持っているか
- DNS がすでにホストを指しているか
- 目標が静的サイトかアプリのリバースプロキシか
- ポートがすでに公開されているか
- HTTPS がすでに部分的に設定されているか
ディストリビューションが不明な場合は、具体的なパッケージまたはサービスコマンドを提示する前に、ユーザーに /etc/os-release を確認してもらうか、尋ねてください。
2. 実行可能なコマンドの前に現在のドキュメントを確認する
ルーティングにはバンドルされたリファレンスを使用し、現在のディストリビューションの動作に依存するコマンドを提示する前に、ライブの公式ドキュメントと照合して詳細を確認してください。
常に以下を確認してください。
- パッケージマネージャーのコマンドとパッケージ名
- ファイアウォールツールとサービス名
- SSH サービスユニット名と設定インクルードパス
- Nginx のパッケージと設定レイアウト
- 選択された ACME クライアントの現在の指示
詳細を確認できない場合は、その旨を伝え、古い Debian チュートリアルのパスが普遍的であるかのように装うのではなく、高レベルのガイダンスを提供してください。
3. フェーズの順序を維持する
ユーザーが既存のセットアップのレビューや修正を明示的に求めている場合を除き、以下の順序でフェーズを進めてください。
- 前提条件
- 安全なアクセス
- ファイアウォールと公開
- ウェブサーバー
- いずれかのホスティングブランチを選択: 静的サイトまたはアプリプロキシ
- HTTPS
- 検証
- オプションの高度なチューニング
静的サイトブランチとリバースプロキシブランチを1つのデフォルトの回答にまとめないでください。ユーザーの目標に一致するブランチを選択してください。
4. 安全ゲートを強制する
これらを厳格な停止チェックとして扱ってください。
- 2番目の SSH セッションでキーベースのログインが機能するまで、SSH ポートの変更、パスワード認証の無効化、または root SSH ログインの無効化を推奨しないでください。
- DNS が意図したホストに解決され、HTTP サイトまたはプロキシパスが期待どおりに機能するまで、証明書の発行を推奨しないでください。
- HTTPS がクリーンにロードされるまで、HTTP から HTTPS へのリダイレクトを強制しないでください。
- 安全なホスティングがすでに機能しているまで、BBR または同様のチューニングを提案しないでください。
常に以下を区別してください。
- ローカルマシンのアクション: SSH、DNS チェック、ブラウザテスト
- サーバーのアクション: パッケージのインストール、設定の編集、サービスの再ロード、ファイアウォールルール
出力に関する期待事項
新規セットアップの場合、以下を提供してください。
- 現在の状態の簡単な診断
- 現在のフェーズと、それが次にくる理由
- サーバーの手順とは別のローカルマシンの手順
- ドキュメント検証後の具体的なコマンドまたは設定スニペットのみ
- 各リスクのある変更後の検証ステップ
- そのフェーズで起こりうる間違いに対する短い「これが失敗した場合、X を確認してください」という分岐
強化またはトラブルシューティングのレビューの場合、以下を提供してください。
- 最も可能性の高いリスクまたは破損を最初に
- 優先順位付けされた修正シーケンス
- 次の設定変更前の最初の安全な検証ステップ
よくある間違い
- 古い記事の Debian 固有のコマンドを Linux 全般に適用できると見なすこと
- 唯一のアクティブなセッションで SSH を強化し、ユーザーをロックアウトすること
- アプリケーションポートを直接開く代わりに、アプリをループバックに保持すること
- 静的ファイルホスティングのガイダンスとリバースプロキシのガイダンスを1つの設定で混在させること
- DNS または HTTP が実際に正しい状態になる前に ACME 発行を試みること
- HTTPS が証明される前にリダイレクトを強制すること
- BBR をコアセットアップの一部として扱い、オプションの後のステップではないと見なすこと
- Nginx があるディストリビューションではファイルを読み取れるが、別のディストリビューションでは読み取れない場合に、SELinux または AppArmor の違いを無視すること
リファレンスの使用方法
フェーズマップ、分岐ロジック、および検証順序については、references/workflow-map.md を使用してください。
ディストリビューションファミリー、パッケージマネージャー、ファイアウォールツール、または設定レイアウトが重要な場合は、references/distro-routing.md を使用してください。
ユーザーが静的サイトブランチまたはリバースプロキシブランチを必要とする場合は、references/nginx-patterns.md を使用してください。
SSH 強化シーケンス、ファイアウォール設定、証明書の発行、更新、およびリダイレクトのタイミングについては、references/security-and-tls.md を使用してください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Secure Linux Web Hosting
Overview
Use this skill to turn a cloud server into a safely reachable web host without leaning on stale distro-specific memory or outdated Debian-10-era tutorials.
This skill keeps the familiar teaching arc of a beginner-friendly server guide, but turns it into a reusable operator workflow:
- Intake and routing
- Prerequisites
- Secure access
- Firewall and exposure
- Web server setup
- Static site or app proxy
- HTTPS
- Validation
- Optional advanced tuning
Before giving actionable commands, identify the distro family and verify the current package names, service units, config paths, and ACME-client guidance against official documentation for the user's distro and chosen tools.
Open references/workflow-map.md first for the
phase sequence, then open the narrower reference file you need.
When to Use
Use this skill when the user mentions any of the following:
- a cloud server, VM, droplet, or other Linux host they want to use for hosting
- connecting a domain or DNS A/AAAA record to a server
- SSH login, SSH hardening, root login, keys, ports, or firewall setup
- installing or configuring Nginx for a website
- serving a simple static site from Linux
- putting a small app behind Nginx as a reverse proxy
- HTTPS, Let's Encrypt, Certbot,
acme.sh, certificate renewal, or redirecting HTTP to HTTPS - optional post-setup performance or network tuning such as BBR
Do not use this skill for:
- Kubernetes, PaaS, or full container-orchestrator deployment design
- application-specific build or CI/CD questions where Linux hosting is not the actual problem
- Windows or macOS host administration
- public multi-tenant production architecture reviews that need a broader SRE or platform-design treatment
Workflow
1. Intake and classify the current state
Start by identifying:
- distro family or image name
- whether the user has root access, an admin user, or only one live SSH session
- whether DNS already points at the host
- whether the goal is a static site or an app reverse proxy
- whether ports are already exposed
- whether HTTPS is already partially configured
If the distro is unknown, ask for it or have the user inspect /etc/os-release
before giving concrete package or service commands.
2. Verify current docs before actionable commands
Use bundled references for routing, then verify details against live official docs before giving commands that depend on current distro behavior.
Always verify:
- package manager commands and package names
- firewall tooling and service names
- SSH service unit names and config include paths
- Nginx package and config layout
- the chosen ACME client's current instructions
If you cannot verify a detail, say so and give high-level guidance instead of pretending the old Debian tutorial path is universal.
3. Keep the phases in order
Walk through the phases in this order unless the user is explicitly asking for review or remediation of an existing setup:
- prerequisites
- secure access
- firewall and exposure
- web server
- choose one hosting branch: static site or app proxy
- HTTPS
- validation
- optional advanced tuning
Do not collapse the static-site branch and reverse-proxy branch into one default answer. Pick the branch that matches the user's goal.
4. Enforce the safety gates
Treat these as hard stop checks:
- Do not recommend changing SSH port, disabling password auth, or disabling root SSH login until key-based login works in a second SSH session.
- Do not recommend certificate issuance until DNS resolves to the intended host and the HTTP site or proxy path works as expected.
- Do not force an HTTP-to-HTTPS redirect until HTTPS loads cleanly.
- Do not suggest BBR or similar tuning until secure hosting is already working.
Always distinguish:
- local-machine actions: SSH, DNS checks, browser tests
- server actions: package install, config edits, service reloads, firewall rules
Output Expectations
For a fresh setup, provide:
- a brief diagnosis of the current state
- the current phase and why it comes next
- local-machine steps separate from server steps
- concrete commands or config snippets only after doc verification
- a verification step after each risky change
- a short "if this fails, check X" branch for the likely mistake at that phase
For a hardening or troubleshooting review, provide:
- the most likely risk or breakage first
- a prioritized remediation sequence
- the first safe verification step before the next config change
Common Mistakes
- treating Debian-specific commands from an old article as Linux-universal
- hardening SSH in the only active session and locking the user out
- opening application ports directly instead of keeping the app on loopback
- mixing static-file hosting guidance and reverse-proxy guidance in one config
- attempting ACME issuance before DNS or HTTP is actually correct
- forcing redirects before HTTPS is proven
- treating BBR as part of the core setup instead of an optional later step
- ignoring SELinux or AppArmor differences when Nginx can read files on one distro but not another
Reference Usage
Use references/workflow-map.md for the phase map,
branching logic, and validation order.
Use references/distro-routing.md when distro
family, package manager, firewall tooling, or config layout matters.
Use references/nginx-patterns.md when the user
needs the static-site branch or the reverse-proxy branch.
Use references/security-and-tls.md for SSH
hardening sequence, firewall posture, certificate issuance, renewal, and
redirect timing.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (6,139 bytes)
- 📎 references/distro-routing.md (3,532 bytes)
- 📎 references/nginx-patterns.md (2,717 bytes)
- 📎 references/security-and-tls.md (3,847 bytes)
- 📎 references/workflow-map.md (5,671 bytes)