Factory-OEM Fast Website

A security-first, ultra-fast static-site CMS for foreign trade. One-command install, WordPress-style admin, zero database on the front end.

专为外贸打造的安全、极速静态站点 CMS。一行命令安装,WordPress 风格后台,前端零数据库。

⚡ What makes it “Fast”?

  • Pure static HTML — No database, no PHP on the front end. ~0.3s first paint globally.
  • Hugo engine — Compiles content in milliseconds. The admin panel writes Markdown, Hugo turns it into HTML.
  • Atomic Rebuilds — Content changes trigger a sandboxed, atomic rebuild. A failed build never breaks the live site.

🛡️ What makes it “Safe”?

  • Hardened PHP — No shell execution (disable_functions), tight open_basedir.
  • Zero code injection — Admins edit content and colors, never templates.
  • Image sanitizer — Uploaded images re-encoded server-side (GD) to strip EXIF & payloads.
  • Audit logs — Login rate-limited; all writes audited to /var/log/fofw-audit.log.
  • Systemd sandbox — Builds run with ProtectSystem=strict, NoNewPrivileges, MemoryDenyWriteExecute.

📋 System Requirements

  • OS: Debian 12 or 13 (fresh install recommended)
  • Access: Root (sudo)
  • Network: Domain A-record pointed to this server (required for automatic SSL)
  • Ports: TCP 80 and 443 open

🚀 One-Command Install

Run the following on a fresh Debian server:

sudo bash -c "$(curl -fsSL https://factory-oem.com/Ai/web/install.sh)"

The installer asks for: domain, company name, tagline, admin username, admin password (at least 12 chars with upper/lower/digit/symbol), contact info, and optional SSL. Takes 3–5 minutes.

🔗 After Install

URLPurpose
https://yourdomain.com/Public site
https://yourdomain.com/publisher/Admin panel

Important: Session cookies require HTTPS. If you skipped SSL, configure it first, then log in.

🖥️ Admin Panel Overview

MenuPurpose
DashboardStats, build status, quick actions
ProductsList / create / edit / delete product pages
NewsList / create / edit / delete news articles
Media LibraryUpload images (auto re-encoded), copy Markdown
ThemesSwitch color palette (Amber / Ocean / Forest)
SettingsSite title, base URL, tagline, contact info
SecurityChange password, view audit log
BackupsCreate & download ZIP of site + config

💡 Why no online template editor?

By design. Editing templates in the browser is the #1 takeover vector in WordPress. To modify templates, SSH into the server and edit /srv/fofw/site/layouts/, then run /usr/local/bin/fofw-build.

🛠️ Useful Commands

# Manually rebuild /usr/local/bin/fofw-build # Manually create a backup (auto daily at 03:30) /usr/local/bin/fofw-backup # Watch build log tail -f /var/log/fofw-build.log # Watch audit log tail -f /var/log/fofw-audit.log

⚡ 为什么“快”?

  • 纯静态 HTML —— 前端无数据库、无 PHP,全球首次渲染约 0.3 秒。
  • Hugo 引擎 —— 毫秒级编译内容。后台写 Markdown,Hugo 自动转为 HTML。
  • 原子化重建 —— 内容变更触发沙箱内原子重建。构建失败绝不会破坏线上站点。

🛡️ 为什么“安全”?

  • PHP 加固 —— 禁用 Shell 执行(disable_functions),严格限制 open_basedir。
  • 零代码注入 —— 管理员只能编辑内容和颜色,永远无法修改模板。
  • 图片净化 —— 上传图片在服务端通过 GD 重新编码,剥离 EXIF 和恶意载荷。
  • 审计日志 —— 登录限流;所有写操作记录到 /var/log/fofw-audit.log。
  • Systemd 沙箱 —— 构建在 ProtectSystem=strict、NoNewPrivileges、MemoryDenyWriteExecute 下运行。

📋 系统要求

  • 操作系统:Debian 12 或 13(建议全新安装)
  • 权限:Root(sudo)
  • 网络:域名 A 记录已指向本服务器(用于自动 SSL)
  • 端口:TCP 80 和 443 已开放

🚀 一行命令安装

在全新的 Debian 服务器上执行:

sudo bash -c "$(curl -fsSL https://factory-oem.com/Ai/web/install.sh)"

安装程序会询问:域名、公司名、标语、管理员用户名、管理员密码(至少 12 位,含大小写字母、数字、符号)、联系信息和可选的 SSL。耗时 3–5 分钟。

🔗 安装完成后

URL用途
https://你的域名.com/公开站点
https://你的域名.com/publisher/管理后台

重要:会话 Cookie 需要 HTTPS。如果跳过了 SSL,请先配置 SSL 再登录。

🖥️ 管理后台概览

菜单用途
仪表盘统计、构建状态、快捷操作
产品列出 / 创建 / 编辑 / 删除产品页面
新闻列出 / 创建 / 编辑 / 删除新闻文章
媒体库上传图片(自动重新编码),复制 Markdown
主题切换配色方案(琥珀 / 海洋 / 森林)
设置站点标题、Base URL、标语、联系信息
安全修改密码、查看审计日志
备份创建并下载站点 + 配置的 ZIP

💡 为什么没有在线模板编辑器?

刻意设计。在浏览器中编辑模板是 WordPress 被入侵的头号途径。要修改模板,请 SSH 登录服务器,编辑 /srv/fofw/site/layouts/,然后运行 /usr/local/bin/fofw-build。

🛠️ 常用命令

# 手动重建 /usr/local/bin/fofw-build # 手动创建备份(每天 03:30 自动执行) /usr/local/bin/fofw-backup # 查看构建日志 tail -f /var/log/fofw-build.log # 查看审计日志 tail -f /var/log/fofw-audit.log