ITPub博客

首页 > IT职业 > IT生活 > PHP与nginx整合

PHP与nginx整合

IT生活 作者:QCHuangChao 时间:2021-09-09 09:28:25 0 删除 编辑

编辑nginx配置文件并保存

vim /usr/local/nginx/conf/nginx.conf

location / {

            root   html;

            index  index.php index.html index.htm;

        }

location ~ .php$ {

            root           html;

            fastcgi_pass   127.0.0.1:9000;

            fastcgi_index  index.php;

            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

            include        fastcgi_params;

        }

编辑PHP主页test文件并保存

vim .//index.php

echo phpinfo();

?>

在你的浏览器中输入 URL: http://在页面中查看php测试页

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3271/viewspace-2803400/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: OC中的KVO
请登录后发表评论 登录
全部评论

注册时间:2019-08-30

  • 博文量
    84
  • 访问量
    675