美文网首页马文的地下室
学习笔记《Mac下的PHP7.1环境》

学习笔记《Mac下的PHP7.1环境》

作者: 马文Marvin | 来源:发表于2017-05-09 01:36 被阅读12次

    可以参考这篇文章安装:
    https://www.sylvaindurand.org/setting-up-a-nginx-web-server-on-macos/
    http://www.jianshu.com/p/ae3f88d52e21
    https://gist.github.com/petemcw/9265670

    服务重启:

    brew services restart php71
    

    日志文件目录:

    /usr/local/var/log/
    

    配置文件目录:

    /usr/local/etc/
    

    Nginx 的配置:

    user marvin staff;
    worker_processes  4;
    
    events {
        worker_connections  1024;
    }
    
    http {
        include       mime.types;
        default_type  application/octet-stream;
    
        server {
            listen       80;
            server_name  www.darwin.com;
    
            root /Users/marvin/Documents/workspace/laravel/DarwinWeb/public;
    
            location / {
                index  index.php;
                try_files $uri $uri/ /index.php;
            }
    
            location ~ \.php {
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    
                fastcgi_index  index.php;
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_param  SCRIPT_FILENAME $request_filename;
                include fastcgi_params;
            }
        }
    }

    相关文章

      网友评论

        本文标题:学习笔记《Mac下的PHP7.1环境》

        本文链接:https://www.haomeiwen.com/subject/omavtxtx.html