您的当前位置:首页>全部文章 >"博客"内的文章 >文章详情
ngxin配置php运行环境
发表于:2021-10-09 11:37:24浏览:390次TAG: #ThinkPHP #PHP #linux #服务器 #nginx


ngxin配置php运行环境

① 运行启动php-fpm,安装php运行环境

# php-fpm

② 配置php环境,

# vim nginx 
    server{
        listen 端口;
        server_name 域名;
        root 根目录;
        index index.php index.html;
        location ~ \.php(.*)$ {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
        } 
    }

③  (可选) 优化配置 

登录 登录阅读全文
栏目分类全部>