2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 09:13:49 +08:00

Revert "feat: 测试修改socket"

This reverts commit 4d2588e449.
This commit is contained in:
2026-01-18 06:04:07 +08:00
parent 4d2588e449
commit 0e2e157001
6 changed files with 13 additions and 13 deletions

View File

@@ -626,7 +626,7 @@ func (v *PHPVhost) PHP() uint {
}
// 从配置内容中提取版本号
// 格式: proxy:unix:/run/php-cgi-84.sock|fcgi://localhost/
// 格式: proxy:unix:/tmp/php-cgi-84.sock|fcgi://localhost/
idx := strings.Index(content, "php-cgi-")
if idx == -1 {
return 0
@@ -646,10 +646,10 @@ func (v *PHPVhost) SetPHP(version uint) error {
}
// 生成 PHP-FPM 配置
// sock 路径格式: unix:/run/php-cgi-84.sock
// sock 路径格式: unix:/tmp/php-cgi-84.sock
content := fmt.Sprintf(`# Auto-generated by AcePanel. DO NOT EDIT MANUALLY!
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php-cgi-%d.sock|fcgi://localhost/"
SetHandler "proxy:unix:/tmp/php-cgi-%d.sock|fcgi://localhost/"
</FilesMatch>
`, version)

View File

@@ -325,7 +325,7 @@ func (s *VhostTestSuite) TestPHPFilesMatchBlock() {
s.NoError(s.vhost.SetPHP(84))
content := s.vhost.Config("010-php.conf", "site")
s.Contains(content, "proxy:unix:/run/php-cgi-84.sock|fcgi://localhost/")
s.Contains(content, "proxy:unix:/tmp/php-cgi-84.sock|fcgi://localhost/")
}
func (s *VhostTestSuite) TestDefaultVhostConfIncludesServerD() {

View File

@@ -726,7 +726,7 @@ func (v *PHPVhost) PHP() uint {
}
// 从配置内容中提取版本号
// 格式: fastcgi_pass unix:/run/php-cgi-84.sock;
// 格式: fastcgi_pass unix:/tmp/php-cgi-84.sock;
idx := strings.Index(content, "php-cgi-")
if idx == -1 {
return 0
@@ -746,11 +746,11 @@ func (v *PHPVhost) SetPHP(version uint) error {
}
// 生成 PHP-FPM 配置
// sock 路径格式: unix:/run/php-cgi-84.sock
// sock 路径格式: unix:/tmp/php-cgi-84.sock
content := fmt.Sprintf(`# Auto-generated by AcePanel. DO NOT EDIT MANUALLY!
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/run/php-cgi-%d.sock;
fastcgi_pass unix:/tmp/php-cgi-%d.sock;
fastcgi_index index.php;
include fastcgi.conf;
include pathinfo.conf;