mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-01-15 03:24:53 +08:00
perf: change php runtime website config (#10387)
Refs https://github.com/1Panel-dev/1Panel/issues/10334
This commit is contained in:
parent
6609871b1e
commit
c1aef03f09
1 changed files with 1 additions and 30 deletions
|
|
@ -391,39 +391,10 @@ func (s *Server) UpdatePHPProxy(proxy []string, localPath string) {
|
|||
},
|
||||
)
|
||||
if localPath == "" {
|
||||
block.AppendDirectives(&Directive{
|
||||
Name: "set",
|
||||
Parameters: []string{"$real_script_name", "$fastcgi_script_name"},
|
||||
})
|
||||
ifDir := &Directive{
|
||||
Name: "if",
|
||||
Parameters: []string{"($fastcgi_script_name ~ \"^(.+?\\.php)(/.+)$\")"},
|
||||
}
|
||||
ifDir.Block = &Block{
|
||||
Directives: []IDirective{
|
||||
&Directive{
|
||||
Name: "set",
|
||||
Parameters: []string{"$real_script_name", "$1"},
|
||||
},
|
||||
&Directive{
|
||||
Name: "set",
|
||||
Parameters: []string{"$path_info", "$2"},
|
||||
},
|
||||
},
|
||||
}
|
||||
block.AppendDirectives(
|
||||
ifDir,
|
||||
&Directive{
|
||||
Name: "fastcgi_param",
|
||||
Parameters: []string{"SCRIPT_FILENAME", "$document_root$real_script_name"},
|
||||
},
|
||||
&Directive{
|
||||
Name: "fastcgi_param",
|
||||
Parameters: []string{"SCRIPT_NAME", "$real_script_name"},
|
||||
},
|
||||
&Directive{
|
||||
Name: "fastcgi_param",
|
||||
Parameters: []string{"PATH_INFO", "$path_info"},
|
||||
Parameters: []string{"SCRIPT_FILENAME", "$document_root$fastcgi_script_name"},
|
||||
},
|
||||
)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue