FCGI: Allow FCGI over unix sockets (#9298)
* FCGI: Allow FCGI over unix sockets * fixup! FCGI: Allow FCGI over unix sockets
This commit is contained in:
parent
4dc3993b22
commit
2c83dac5d4
5 changed files with 22 additions and 7 deletions
|
@ -122,6 +122,7 @@ func runWeb(ctx *cli.Context) error {
|
|||
switch setting.Protocol {
|
||||
case setting.UnixSocket:
|
||||
case setting.FCGI:
|
||||
case setting.FCGIUnix:
|
||||
default:
|
||||
// Save LOCAL_ROOT_URL if port changed
|
||||
cfg := ini.Empty()
|
||||
|
@ -149,7 +150,7 @@ func runWeb(ctx *cli.Context) error {
|
|||
}
|
||||
|
||||
listenAddr := setting.HTTPAddr
|
||||
if setting.Protocol != setting.UnixSocket {
|
||||
if setting.Protocol != setting.UnixSocket && setting.Protocol != setting.FCGIUnix {
|
||||
listenAddr += ":" + setting.HTTPPort
|
||||
}
|
||||
log.Info("Listen: %v://%s%s", setting.Protocol, listenAddr, setting.AppSubURL)
|
||||
|
@ -183,10 +184,13 @@ func runWeb(ctx *cli.Context) error {
|
|||
err = runHTTPS("tcp", listenAddr, setting.CertFile, setting.KeyFile, context2.ClearHandler(m))
|
||||
case setting.FCGI:
|
||||
NoHTTPRedirector()
|
||||
err = runFCGI(listenAddr, context2.ClearHandler(m))
|
||||
err = runFCGI("tcp", listenAddr, context2.ClearHandler(m))
|
||||
case setting.UnixSocket:
|
||||
NoHTTPRedirector()
|
||||
err = runHTTP("unix", listenAddr, context2.ClearHandler(m))
|
||||
case setting.FCGIUnix:
|
||||
NoHTTPRedirector()
|
||||
err = runFCGI("unix", listenAddr, context2.ClearHandler(m))
|
||||
default:
|
||||
log.Fatal("Invalid protocol: %s", setting.Protocol)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue