wilon.github.io icon indicating copy to clipboard operation
wilon.github.io copied to clipboard

BashOnWindows Nginx+PHP7.0,无法解析PHP文件

Open wilon opened this issue 8 years ago • 0 comments
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

wilon avatar May 16 '17 13:05 wilon