mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-13 17:24:44 +08:00
feat: 修改nginx为host模式
This commit is contained in:
parent
fb90fae87f
commit
6f7584b72d
@ -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…
x
Reference in New Issue
Block a user