-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
674 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: "FastCGI Upstream" | ||
--- | ||
|
||
To support FastCGI upstream add `proto=fcgi` option to the `urlprefix-` tag. | ||
|
||
FastCGI upstreams support following configuration options: | ||
|
||
- `index`: Used to specify the index file that should be used if the request URL does not contain a | ||
file. | ||
- `root`: Document root of the FastCGI server. | ||
|
||
Note that `index` and `root` can also be set in Fabio configuration as global default. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: "fcgi.index" | ||
--- | ||
|
||
`fcgi.index` configures the index file to be used in FastCGI requests if the URL does not contain | ||
it. | ||
|
||
Default value is | ||
|
||
``` | ||
fcgi.index = index.php | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: "fcgi.path.split" | ||
--- | ||
|
||
`fcgi.path.split` specifies how to split the URL; the split value becomes the end of the first part | ||
and anything in the URL after it becomes part of the `PATH_INFO` CGI variable. | ||
|
||
Default value is | ||
|
||
``` | ||
fcgi.path.split = .php | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: "fcgi.root" | ||
--- | ||
|
||
`fcgi.root` sets the document root for FastCGI requests. | ||
|
||
Default value is empty string | ||
|
||
``` | ||
fcgi.root = | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: "fcgi.timeout.read" | ||
--- | ||
|
||
`fcgi.timeout.read` is the time allowed to read a response from upstream. | ||
|
||
Default value is | ||
|
||
``` | ||
fcgi.timeout.read = 10s | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: "fcgi.timeout.write" | ||
--- | ||
|
||
`fcgi.timeout.write` is the time allowed to upload complete request to upstream. | ||
|
||
Default value is | ||
|
||
``` | ||
fcgi.timeout.write = 10s | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package fastcgi | ||
|
||
import ( | ||
"io" | ||
"net/http" | ||
"time" | ||
) | ||
|
||
type staticFcgiBackend struct { | ||
OptionsFunc func(map[string]string) (*http.Response, error) | ||
HeadFunc func(map[string]string) (*http.Response, error) | ||
GetFunc func(map[string]string) (*http.Response, error) | ||
PostFunc func(map[string]string, string, string, io.Reader, int64) (*http.Response, error) | ||
SetReadTimeoutFunc func(time.Duration) error | ||
SetSendTimeoutFunc func(time.Duration) error | ||
StderrFunc func() string | ||
CloseFunc func() | ||
} | ||
|
||
func (b *staticFcgiBackend) Options(params map[string]string) (*http.Response, error) { | ||
return b.OptionsFunc(params) | ||
} | ||
|
||
func (b *staticFcgiBackend) Head(params map[string]string) (*http.Response, error) { | ||
return b.HeadFunc(params) | ||
} | ||
|
||
func (b *staticFcgiBackend) Get(params map[string]string) (*http.Response, error) { | ||
return b.GetFunc(params) | ||
} | ||
|
||
func (b *staticFcgiBackend) SetReadTimeout(dur time.Duration) error { | ||
return b.SetReadTimeoutFunc(dur) | ||
} | ||
|
||
func (b *staticFcgiBackend) SetSendTimeout(dur time.Duration) error { | ||
return b.SetSendTimeoutFunc(dur) | ||
} | ||
|
||
func (b *staticFcgiBackend) Stderr() string { | ||
return b.StderrFunc() | ||
} | ||
|
||
func (b *staticFcgiBackend) Post(params map[string]string, method string, bodyType string, body io.Reader, l int64) (*http.Response, error) { | ||
return b.PostFunc(params, method, bodyType, body, l) | ||
} | ||
|
||
func (b *staticFcgiBackend) Close() {} |
Oops, something went wrong.