# 容易学首页改标题加演示地址,skill MCP 地址改用 e-study.cn,发布到服务器
## 问题背景
每日课公网测试包(`docs/competition/prod`)要发布到 `neotao@8.152.195.43` 的 `/home/neotao/easy-study/`,域名 `https://e-study.cn/`。首页 `index.html` 要改标题、加演示入口;homework-push 技能里的 MCP 地址还是 `<域名>` 占位和本机默认值。
服务器检查发现:nginx `conf.d/default/easy-study.conf` 用 `location /` + `autoindex on` 把整个发布包目录暴露出去;`/stellia-daily-lesson/`、`/stellia-daily-lesson-static/` 没配;旧后端进程在已删除的目录里继续跑,占着 8160。
## 用户对话整理
- 将 index.html 标题改为「容易学」,并添加相对路径链接:「演示地址」。
- 修改 skill 中 mcp 地址为 https://e-study.cn/ 作为根路径的相对地址进行访问。
- 登录 neotao@8.152.195.43 进行 nginx 配置检查。
- 最终会将当前路径下所有文件放到服务器 /home/neotao/easy-study/ 路径下,通过 chrome mcp 测试调通。
- 已加了 sudo 免密执行,直接发布重启。
## 后续任务步骤
1. `index.html`:`
` 改为「容易学」,导航栏加「演示地址」,链接 `stellia-daily-lesson/plan.html`。
2. homework-push:根地址 `LESSON_ROOT` 默认 `https://e-study.cn/`,接口 `stellia-daily-lesson-api`、页面目录 `stellia-daily-lesson/` 相对根地址拼出;`LESSON_API`、`LESSON_PAGE_BASE` 仍可单独覆盖。
3. 停掉旧后端,上传发布包到 `/home/neotao/easy-study/`,`./run.sh start`。
4. nginx:备份 `easy-study.conf`,改成只放出首页 `index.html`,其余 include `nginx/daily-lesson.locations.conf`;`nginx -t` 后 reload。
5. Chrome MCP 测首页、演示地址、三个页面、字体、练习页,curl 测 MCP `tools/list`,确认数据库、脚本等路径不再可下载。
## 规划
- nginx 不再用 `location /` alias 整个发布包,避免 `lesson.db`、`.venv`、日志和技能被公网列出。
- 接口反代用发布包模板里的 `127.0.0.1`,不用 `localhost`。
- push.py 默认在线检查练习页(根地址有默认值了),不联网时用 `--offline`。
## 说明
- 相关旧目录:`tasks/1030-每日课公网测试包/`。
- `index.html`、`skills/homework-push/SKILL.md` 开工时就是未跟踪文件,属于开工基线,不自动提交;只提交了 `push.py`(cef30ac)。
- 11-01 已发布:93 个文件解压到 `/home/neotao/easy-study/`,后端 `./run.sh start`(python3.11 新建 `.venv`,pid 1460225),MCP 密钥沿用 `~/.config/daily-lesson/env`。旧后端进程开工时已经不在了。
- nginx:原 `conf.d/default/easy-study.conf` 备份为 `/etc/nginx/conf.d/easy-study.conf.bak-1101`(不匹配 include 通配),新配置 `nginx -t` 通过后 reload。
- 验证:首页标题「容易学」,「演示地址」解析为 `https://e-study.cn/stellia-daily-lesson/plan.html`;Chrome MCP 测 plan、task-detail(10-29 语文)→ 去练习、kid-todo、数学 1030 练习页,全部 200、控制台无报错;MCP `tools/list` 14 个工具、无密钥 401、`get_homework` 正常;`push.py check` 用默认根地址在线校验通过;`/backend/data/lesson.db`、`/run.sh`、`/skills/`、`/README.md`、`/nginx/*.conf` 都是 404。
- 遗留:服务器没有 80 端口,`http://e-study.cn/` 打不开、不跳 https;`conf.d/default.conf` 和 `nginx.conf` 都有 `[::]:443` server,重复但不影响;`PUT /plan` 请求体超过缓冲区,nginx 记 warn,不影响结果;`backend/mcp-sample.json`、`README.md` 里还是 `<域名>` 占位,本次没改。