Mac nginx php-fpm, nginxphp-fpm
Once again, I was stuck in a silly problem. I suspect that mac is different from centos installation. After troubleshooting again and again, I finally found out. It turns out that my nginx. conf configuration has less than one letter. Finally, this error was located thanks to the ls check. It is not a big problem at all. It is too painful to make this mistake again.
Conclusion: The installation of nginx + php development environment in OS x source code is the same as that in centos.
How does nginx php fpm Display error logs?
To enable php-fpm to Display error logs, configure php-fpm first.
Configure the file path for the php error log in the php-fpm configuration file (usually in the etc/php-fpm.conf under the php installation directory.
; Error log file; If it's set to "syslog", log is sent to syslogd instead of being written; in a local file .; note: the default prefix is/home/wangwei/php/var; Default Value: log/php-fpm.log; error_log = log/php-fpm.log above is where error logs are configured in my php-fpm.conf files. Remove the; before error_log = log/php-fpm.log and change:
; Error log file; If it's set to "syslog", log is sent to syslogd instead of being written; in a local file .; note: the default prefix is/home/wangwei/php/var; Default Value: log/php-fpm.logerror_log =/home/work/log/php-fpm.log.wf after modification, save the configuration, restart php-fpm.
Note that if the relative path is used, the prefix of the path is based on the var directory of the php installation directory.
The question about proxy in nginx: Which server does php-fpm add?
Proxy Server
Nginx listens to port 80 on the Internet of your machine (usually)
Then, the php-fpm Environment added to the proxy server listens to the php Code related to automatic parsing of port 9000 on the Intranet.