美文网首页
centos nginx php访问

centos nginx php访问

作者: 七叶笔记 | 来源:发表于2019-12-13 10:32 被阅读0次

    host 配置
    server {
    listen 80;
    server_name test.com;
    root /var/www/test;
    index index.html index.php;
    location ~ .php$ {
    fastcgi_pass 127.0.0.1:9000; #指定了fastcgi进程侦听的端口,nginx就是通过这里与php交互的
    include fastcgi.conf;
    }
    }

    php安装

    PHP 7.0版本

    $ yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64
    yum install php70w-fpm

    还有其他版本把70换71,即可。

    https://blog.csdn.net/sinat_32829963/article/details/81558483

    https://www.jianshu.com/p/eab11cd1bb28

    相关文章

      网友评论

          本文标题:centos nginx php访问

          本文链接:https://www.haomeiwen.com/subject/fcffnctx.html