ngxin配置php运行环境
发表于:2021-10-09 11:37:24浏览:390次
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; } }
③ (可选) 优化配置