Secure linux web hosting

From xixu-me/skills · View interactive version

Secure linux web hosting is an AI agent skill from the GitHub repository xixu-me/skills. 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.

How to use this skill

Skill file

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:

  1. Intake and routing
  2. Prerequisites
  3. Secure access
  4. Firewall and exposure
  5. Web server setup
  6. Static site or app proxy
  7. HTTPS
  8. Validation
  9. 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 CODE0 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:

HTTP to HTTPS

Do not use this skill for:

actual problem

or platform-design treatment

Workflow

1. Intake and classify the current state

Start by identifying:

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:

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:

  1. prerequisites
  2. secure access
  3. firewall and exposure
  4. web server
  5. choose one hosting branch: static site or app proxy
  6. HTTPS
  7. validation
  8. 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:

root SSH login until key-based login works in a second SSH session.

and the HTTP site or proxy path works as expected.

Always distinguish:

Output Expectations

For a fresh setup, provide:

For a hardening or troubleshooting review, provide:

Common Mistakes

distro but not another

Reference Usage

Use CODE0 for the phase map,

branching logic, and validation order.

Use CODE0 when distro

family, package manager, firewall tooling, or config layout matters.

Use CODE0 when the user

needs the static-site branch or the reverse-proxy branch.

Use CODE0 for SSH

hardening sequence, firewall posture, certificate issuance, renewal, and

redirect timing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.