Files
mkdocs/docs/Obsidian笔记体系/Projects/女童生长激素项目/配置完成.md
2026-01-30 10:45:19 +08:00

43 lines
951 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 配置完成
已修改 nginx 配置支持通过 IP 访问,且不影响域名访问。
### 修改内容
1. 系统 nginx 配置 (/etc/nginx/conf.d/default.conf)
- 添加 IP 地址 101.43.95.130  server_name
- 配置项目路径指向 /www/wwwroot/code/public
- 配置 PHP-FPM 处理使用 PHP 5.6
- 添加 ThinkPHP 路由重写规则
1. 宝塔 nginx 配置 (/www/server/panel/vhost/nginx/101.43.95.130.conf)
- server_name 中添加了 IP 地址
### 访问方式
- 通过 IP 访问http://101.43.95.130
- 后台登录http://101.43.95.130/adminghd/login
- 域名访问https://www.ruilaizipj.com不受影响
### 测试结果
- 首页访问正常200
- 后台登录页面正常200
### 说明
- 域名解析恢复后,域名访问不受影响
- IP 和域名可同时使用
- 两个配置指向同一项目目录,功能一致
项目已启动,可通过 IP 地址访问。