zoukankan      html  css  js  c++  java
  • linux 配置nginx + php

    nginx

    通过yum安装以下依赖:

    yum install gcc-c++
    yum install openssl*
    yum install pcre*
    yum install zlib
    yum install zlib-devel
    yum install wget


    # 我选择了一个相对较新的版本,下载到当前目录
    wget http://nginx.org/download/nginx-1.13.9.tar.gz

    # 解压
    tar -xvf nginx-1.13.9.tar.gz

    ./configure --prefix=安装目录
    make && make install

    # 找到nginx.conf, sbin 启动, -s reload
    find / -name '*nginx*
    find / -name '*sbin*'

    关闭CentOS7默认防火墙

    // 启动firewall
    systemctl start firewalld.service
    // 停止firewall
    systemctl stop firewalld.service
    // 禁止firewall开机启动
    systemctl disable firewalld.service


    -------------------------
    --------------------------------------------------

    php
    yum install php php-fpm  
    
    启动php-fpm  
    systemctl start php-fpm  
    service php-fpm restart


    nginx.conf 文件
    开放php, 修改
    location ~ .php$ {
        fastcgi_pass 127.0.0.1:9000;
        include fastcgi.conf;
    }
     
     

    https://qq52o.me/2482.html#comments 

  • 相关阅读:
    uva 11294 Wedding
    uvalive 4452 The Ministers’ Major Mess
    uvalive 3211 Now Or Later
    uvalive 3713 Astronauts
    uvalive 4288 Cat Vs. Dog
    uvalive 3276 The Great Wall Game
    uva 1411 Ants
    uva 11383 Golden Tiger Claw
    uva 11419 SAM I AM
    uvalive 3415 Guardian Of Decency
  • 原文地址:https://www.cnblogs.com/ignacio/p/11057491.html
Copyright © 2011-2022 走看看