Skip to content

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

Description

@wilon

修改配置文件

不要使用 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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions