mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-06 22:55:38 +08:00
feat: 修改nginx为host模式
This commit is contained in:
parent
ebd830887c
commit
37faf7a7fb
2 changed files with 3 additions and 6 deletions
|
@ -3,8 +3,7 @@ services:
|
|||
container_name: ${CONTAINER_NAME}
|
||||
image: nginx:1.23.1
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel
|
||||
network_mode: host
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_HTTP}:80
|
||||
- ${PANEL_APP_PORT_HTTPS}:443
|
||||
|
@ -14,6 +13,4 @@ services:
|
|||
- ./conf/conf.d:/etc/nginx/conf.d/
|
||||
- ./ssl:/etc/nginx/ssl
|
||||
|
||||
networks:
|
||||
1panel:
|
||||
external: true
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ func configDefaultNginx(website *model.WebSite, domains []model.WebSiteDomain) e
|
|||
server.UpdateListen(strconv.Itoa(domain.Port), false)
|
||||
}
|
||||
server.UpdateServerName(serverNames)
|
||||
proxy := fmt.Sprintf("http://%s:%d", appInstall.ServiceName, appInstall.HttpPort)
|
||||
proxy := fmt.Sprintf("http://127.0.0.1:%d", appInstall.HttpPort)
|
||||
server.UpdateRootProxy([]string{proxy})
|
||||
|
||||
config.FilePath = configPath
|
||||
|
|
Loading…
Add table
Reference in a new issue