Skip to content

fix: openresty fastcgi_params - #8769

Merged
zhengkunwang223 merged 2 commits into
1Panel-dev:devfrom
520svip:pr/openresty-20260726
Jul 27, 2026
Merged

fix: openresty fastcgi_params#8769
zhengkunwang223 merged 2 commits into
1Panel-dev:devfrom
520svip:pr/openresty-20260726

Conversation

@520svip

@520svip 520svip commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added the missing SCRIPT_FILENAME fastcgi parameter to the fastcgi_params file of all four OpenResty versions (1.21.4.3, 1.27.1.2, 1.29.2.5, 1.31.1.1) so PHP-FPM can correctly locate the script to execute.
  • Fixed apps/openresty/1.21.4.3-3-3-focal/conf/fastcgi_params, which was missing 6 parameters (HTTP_HOST, HTTP_USER_AGENT, HTTP_REFERER, HTTP_COOKIE, HTTP_X_FORWARDED_FOR, REQUEST_TIME) compared to the other three versions, making all four versions consistent.
  • Changed the HTTP_HOST fastcgi parameter value from $http_host to $host in all four versions' fastcgi_params.

Validation

  • Confirmed all four fastcgi_params files now contain the same set of parameters.
  • Confirmed SCRIPT_FILENAME uses $document_root$fastcgi_script_name, so PHP requests resolve to the correct file.
  • Confirmed HTTP_HOST is now $host across all four versions.

Notes

  • SCRIPT_FILENAME is required by PHP-FPM; previously it only existed as a commented-out and incorrect line (/scripts$fastcgi_script_name) in build/nginx.vh.default.conf.
  • The fastcgi-php.conf files were intentionally left unchanged; the parameter belongs in fastcgi_params.
  • With HTTP_HOST set to $host, the port is omitted. This is fine for sites on standard ports (80/443), but non-standard ports (e.g. :8080) will not be reflected in the backend HTTP_HOST.

520svip added 2 commits July 26, 2026 12:33
(cherry picked from commit 2baa3f6)
(cherry picked from commit cf8f52a)
@zhengkunwang223
zhengkunwang223 merged commit 374f6b4 into 1Panel-dev:dev Jul 27, 2026
1 check passed
@520svip
520svip deleted the pr/openresty-20260726 branch September 1, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants