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 

  • 相关阅读:
    DNS服务器详解
    numpy学习
    test_pandas
    1.爬虫基本介绍
    数据分析介绍及软件使用 01
    3.解析库beautifulsoup
    jQuery UI vs EasyUI
    "file:///" file 协议
    Display:Block
    前端响应式设计中@media等的相关运用
  • 原文地址:https://www.cnblogs.com/ignacio/p/11057491.html
Copyright © 2011-2022 走看看