can set docroot per sub-path

master
Dingjun 8 years ago
parent 03e46baecd
commit 541352b6d8

@ -27,6 +27,7 @@ type vhost struct {
type rule struct {
URLPrefix string
IsRegex bool
Docroot string
Type string
Target target
}

@ -63,7 +63,11 @@ func initRouters(cfg conf) {
case "uwsgi":
registerUwsgiHandler(rule, router)
case "fastcgi":
registerFastCGIHandler(rule, l.Docroot, router)
docroot := l.Docroot
if rule.Docroot != "" {
docroot = rule.Docroot
}
registerFastCGIHandler(rule, docroot, router)
case "reverse":
registerHTTPHandler(rule, router)
default:

Loading…
Cancel
Save