您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

nginx不能解析php

2024/7/2 11:10:58发布39次查看
首先先安装php-fpm
yum install php-fpmservice php-fpm start #启动 php-fpm
然后修改nginx配置文件nginx.conf 识别php
vi /usr/local/nginx/conf/nginx.conf 加一段代码
location ~ \.php$ { #fastcgi_split_path_info ^(.+\.php)(/.+)$; root /usr/share/nginx/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param script_filename /usr/share/nginx/html/$fastcgi_script_name; include fastcgi_params;#$document_root }
最后重启nginx和php-fpm
service nginx restartservice php-fpm restart
推荐教程:php视频教程
以上就是nginx不能解析php的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product