fix: openresty fastcgi_params - #8769
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SCRIPT_FILENAMEfastcgi parameter to thefastcgi_paramsfile 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.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.HTTP_HOSTfastcgi parameter value from$http_hostto$hostin all four versions'fastcgi_params.Validation
fastcgi_paramsfiles now contain the same set of parameters.SCRIPT_FILENAMEuses$document_root$fastcgi_script_name, so PHP requests resolve to the correct file.HTTP_HOSTis now$hostacross all four versions.Notes
SCRIPT_FILENAMEis required by PHP-FPM; previously it only existed as a commented-out and incorrect line (/scripts$fastcgi_script_name) inbuild/nginx.vh.default.conf.fastcgi-php.conffiles were intentionally left unchanged; the parameter belongs infastcgi_params.HTTP_HOSTset 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 backendHTTP_HOST.