wilon.github.io
wilon.github.io copied to clipboard
BashOnWindows Nginx+PHP7.0,无法解析PHP文件
trafficstars
修改配置文件
不要使用 sock 方式! nginx.conf
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php7.0-cgi alone:
fastcgi_pass 127.0.0.1:9000;
# With php7.0-fpm:
# fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
php-fpm.conf
; listen = /run/php/php7.0-fpm.sock
listen = 127.0.0.1:9000
listen.allowed_clients = 127.0.0.1
确保服务正常
service nginx start
service php7.0-fpm start