Skip to content
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+php doesn't work #3523

Closed
benxiaohair opened this issue Sep 2, 2018 · 2 comments
Closed

nginx+php doesn't work #3523

benxiaohair opened this issue Sep 2, 2018 · 2 comments

Comments

@benxiaohair
Copy link

benxiaohair commented Sep 2, 2018

ip+port

php-fpm.config
listen = 127.0.0.1:9000

nginx.conf
location ~ \.php$ { # # With php-cgi (or other tcp sockets): fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }

php restart
nginx restart

nginx.error.log
2018/09/02 23:24:22 [error] 13899#13899: *9 upstream timed out (110: Connection timed out) while reading upstream, client: 192.168.0.105, server: _, request: "GET /i.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "local.tbk.com"

/var/log/php7.2-fpm.log:
[02-Sep-2018 23:12:36] NOTICE: exiting, bye-bye! [02-Sep-2018 23:12:36] ERROR: failed to retrieve TCP_INFO for socket: Protocol not available (92) [02-Sep-2018 23:12:36] NOTICE: fpm is running, pid 13852 [02-Sep-2018 23:12:36] NOTICE: ready to handle connections [02-Sep-2018 23:12:36] NOTICE: systemd monitor interval set to 10000ms [02-Sep-2018 23:12:37] ERROR: failed to retrieve TCP_INFO for socket: Protocol not available (92) [02-Sep-2018 23:12:39] ERROR: failed to retrieve TCP_INFO for socket: Protocol not available (92)

why ?

@benxiaohair benxiaohair changed the title nginx+php not work nginx+php doesn't work Sep 2, 2018
@benxiaohair
Copy link
Author

http {
...
fastcgi_buffering off;
...
}

success

@therealkenc
Copy link
Collaborator

#1982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants