[FIX] confused nginx upstream

This commit is contained in:
glyasai 2019-10-22 17:41:40 +08:00
parent 32dc844b43
commit 499bebf3fe
3 changed files with 5 additions and 4 deletions

View File

@ -100,7 +100,7 @@ func Run(s *option.GWServer) error {
logrus.Info("RBD app gateway start success!")
term := make(chan os.Signal)
signal.Notify(term, os.Interrupt, syscall.SIGTERM)
signal.Notify(term, os.Interrupt, syscall.SIGTERM, syscall.SIGQUIT)
select {
case <-term:
logrus.Warn("Received SIGTERM, exiting gracefully...")

View File

@ -243,7 +243,8 @@ func (n *NginxConfigFileTemplete) WriteServer(c option.Config, configtype, tenan
}
n.writeLocks[tenant].Lock()
defer n.writeLocks[tenant].Unlock()
serverConfigFile := path.Join(n.configFileDirPath, configtype, tenant, "servers.conf")
filename := fmt.Sprintf("%s_servers.conf", tenant)
serverConfigFile := path.Join(n.configFileDirPath, configtype, tenant, filename)
first := true
if servers == nil || len(servers) < 1 {
logrus.Warnf("%s proxy is empty, nginx server[%s] will clean up", tenant, serverConfigFile)

View File

@ -160,10 +160,10 @@ http {
}
}
}
include http/*/*.conf;
include http/*/*_servers.conf;
}
stream {
include stream/*/upstreams.conf;
include stream/*/servers.conf;
include stream/*/*_servers.conf;
}