-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
解决官网手册Nginx配置错误导致死循环PHP502 500报错 #552
Comments
可有可无 |
关键地方是 调用 fastcgi 是缺少 PATH_INFO 信息 if (!-e $request_filename) {
rewrite ^/(.*) /index.php?$1 last;
}
# 关键点:
location ~ ^/index\.php(/|$) {
# fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
# fastcgi_pass /var/run/php-fpm.sock ;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_hide_header X-Powered-By;
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https:/letwang/HookPHP 在使用Yaf2.0+版本时没有问题,很完美,根据官网手册配置的:https://www.php.net/manual/en/yaf.tutorials.php#example-3855
但是自从HookPHP升级到PHP8 + Yaf3.3.3版本,就报错了导致Nginx死循环 PHP报502 500错误:
解决:
Example #3 Rewrite rule
for nginx
唯一的变化,是 多出1个 ?问号
The text was updated successfully, but these errors were encountered: