Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用Supervisor管理两个GF项目出现模板互相影响的现象 #427

Closed
macnie opened this issue Dec 11, 2019 · 1 comment
Closed

使用Supervisor管理两个GF项目出现模板互相影响的现象 #427

macnie opened this issue Dec 11, 2019 · 1 comment
Labels

Comments

@macnie
Copy link

@macnie macnie commented Dec 11, 2019

环境

GF版本: 1.10.0
Linux:Ubuntu 18.04
Supervisor:3.3.1
Go:1.13.4

项目目录:

A: /var/www/dou/a 端口:8809
B: /var/www/dou/b 端口:8808

A项目的layout路径:/template/layout.html
B项目的layout路径:/template/layout.html

问题复现

使用supervisor来管理两个进程 执行

supervisorctl restart all 

运行结果

  • B项目显示的页面,layout使用了A项目的layout,但maintpl正常。就是网页头部和脚部显示了A项目的头部和脚部。
  • config/app.toml配置文件不能正常加载,现象为首页文章列表没有显示。

排查问题

停掉B项目

supervisortctl stop b

直接在B项目根目录执行

 ./b 

运行结果

  • 两个项目的layout都显示正常
  • 配置文件可以正常加载,首页文章列表正常显示。
@macnie
Copy link
Author

@macnie macnie commented Dec 11, 2019

解决方法已找到:

需要手工设置模板路径,和配置文件路径。

@gqcn gqcn added the question label Dec 17, 2019
@gqcn gqcn closed this Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.