macos 下连接php 人大金仓pdo_kdb问题

准备工作

1.下载docker 桌面版 傻瓜式操作

https://docs.docker.com/desktop/install/mac-install/

2.安装完成后配置一波docker的命令行。

echo export PATH="/Applications/Docker.app/Contents/Resources/bin:$PATH" > ~/.zshrc

3、搞一波php 7.2的镜像

docker pull php:7.2

4、进入镜像配置

docker run --volume=/Users/test/tests:/home --workdir=/var/www/html -p 9020:9000 --runtime=runc -d php:7.2-fpm

配置一波本地 地址 这样就可以使用本地的nginx了

5、启动然后操作

6、本地nginx配置如下:

server
{
    listen 8080;
    server_name sssssss.org;


        root /Users/tesss/tests/teeeeeeeee;
        index index.php index.html error/index.html;

        location ~ [^/]\.php(/|$) 
        {
                    fastcgi_pass   127.0.0.1:9020; //docker映射的端口
                    fastcgi_index  index.php;
                    fastcgi_param  SCRIPT_FILENAME  /home/tests$fastcgi_script_name;  //docker里面/home/tests 路径
                    include        /usr/local/etc/nginx/fastcgi_params;
                include   /usr/local/etc/nginx/paths.conf;      
        }


}

posted @ 2023-08-22 14:21  尘梦  阅读(118)  评论(0编辑  收藏  举报