当前位置:Gxlcms > PHP教程 > 1.3-测试php解析

1.3-测试php解析

时间:2021-07-01 10:21:17 帮助过:5人阅读

配置解析php

vim /usr/local/nginx/conf/nginx.conf //把下面的配置,前面的#删除,并更改fastcgi_param SCRIPT_FILENAME 那一行


location ~ \.php$ {

root html;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name;

include fastcgi_params;

}

重新加载 /usr/local/nginx/sbin/nginx -s reload


vim /usr/local/nginx/html/1.php

增加

phpinfo();

?>


测试: curl localhost/1.php

人气教程排行