永久关闭防火墙
sudo systemctl stop firewalld
sudo systemctl disable firewall

有两个防火墙!如果上面那个关闭还不行,就继续关这个后重启。

 


需要关闭防火墙!才能访问,或者开放端口。
server {
    listen 8080;
    server_name  192.168.2.128;
    root   /usr/share/nginx/html/test1;
   
    location / {        
        index index.php index.html index.htm;
        if (!-e $request_filename) {
          rewrite  ^(.*)$  /index.php?s=/$1  last;
          break;
        }
    }
   
    location ~ \.(php|phar)(/.*)?$ {
      fastcgi_split_path_info  ^(.+\.(?:php|phar))(/.*)$;
      fastcgi_intercept_errors on;
      fastcgi_index index.php;
      include   fastcgi_params;
      fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
      fastcgi_param PATH_INFO $fastcgi_path_info;
      fastcgi_pass  127.0.0.1:9000;
    }
}

systemctl restart nginx.service

setenforce 0

 

搭建lnmp环境-nginx关联php-fpm (第三步)的更多相关文章

  1. centos7.2环境yum方式快速搭建lnmp环境nginx+mariadb+php-fpm

    centos7.2环境yum方式安装nginx+mariadb+php-fpm 1.安装lnmp环境 安装epel源 yum install -y epel-release 安装 MySQL + PH ...

  2. Vmware搭建LNMP环境(Centos7+Nginx+Mysql+PHP7.1.8)

    参考:1.Linux学习之CentOS(一)----在VMware虚拟机中安装CentOS 7(图文教程) 2.Centos7搭建LNMP环境 3.MySQL5.7修改默认root密码 4.CentO ...

  3. CentOS 7 源码搭建LNMP环境

    搭建 LNMP 环境 源码包版本 :  CentOS Linux  7 nginx-1.15.1.tar.gz  mysql-boost-5.7.21.tar.gz  php-7.2.7.tar.gz ...

  4. docker搭建lnmp环境(问题,资料,命令)

    入门参考 http://www.runoob.com/docker/docker-install-nginx.html 十大常用命令玩转docker 1. #从官网拉取镜像 docker pull & ...

  5. centos7 yum搭建lnmp环境及配置wordpress超详细教程

    yum安装lnmp环境是最方便,最快捷的一种方法.源码编译安装需要花费大量的人类时间,当然源码编译可以个性化配置一些其它功能.目前来说,yum安装基本满足我们搭建web服务器的需求. 本文是我根据近期 ...

  6. Docker之使用Docker-compose搭建LNMP环境

    之前有随笔介绍使用Docker-compose搭建LNMP环境(centos6 php5.6) https://www.cnblogs.com/minseo/p/10146982.html 本文介绍D ...

  7. CentOS6.6搭建LNMP环境

    CentOS6.6搭建LNMP环境 1.设置yum源,本地安装依赖包 1 yum -y install gcc gcc-c++ automake autoconf libtool make 2.下载依 ...

  8. Yum搭建LNMP环境(动、静、库分离)(week4_day5)--技术流ken

    前言 本篇博客使用yum来搭建lnmp环境,将采用动态,静态以及数据库分开安装的方式即nginx,php,mysql.会被分开安装在不同的服务器之上,搭建出来一套lnmp环境,并部署wordpress ...

  9. [Linux] deepin15.8搭建LNMP环境

    LAMP和LNMP LAMP==Linux+Apache+Mysql+PHP LNMP==Linux+Nginx+Mysql+PHP 安装nginx sudo apt install nginx 安装 ...

  10. ubuntu通过apt-get方式搭建lnmp环境以及php扩展安装

    v 一直是在用的lnmp的集成安装包搭建lnmp环境,因为工作需要需要安装ldap扩展,在网上怎么都找不到源码安装包,只能卸载掉原来的lnmp环境,用ubuntu的php5-ldap扩展, 在安装中遇 ...

随机推荐

  1. 深入探讨Function Calling:在Semantic Kernel中的应用实践

    引言 上一章我们熟悉了 OpenAI 的 function calling 的执行原理,这一章节我们讲解一下 function calling 在 Semantic Kernel 的应用. 在Open ...

  2. SQL KEEP 窗口函数等价改写案例

    一哥们出条sql题给我玩,将下面sql改成不使用keep分析函数的写法. select deptno, ename, sal, hiredate, min(sal) keep(dense_rank f ...

  3. const与指针的组合

    ① const int *p; //指向一个整型常量的指针,p可变,p指向的对象不可变. ② int const *p; //同上. ③ int * const p; //p不可变,p指向的对象可变( ...

  4. c# .net mvc 使用百度Ueditor富文本框上传文件(图片,视频等)

    使用背景: 项目中需要用的富文本框去上传视频,图片的话大部分都是可以的.相对来说,国外的富文本框很成熟.但鉴于文档是英语,这里使用了百度的富文本框. 采用的api的方式,调用接口进行上传文件.话不多说 ...

  5. C#.NET AES ECB 加密

    加密: /// <summary> /// 加密 /// </summary> /// <param name="content">要加密的串& ...

  6. 《Android开发卷——自定义日期选择器(一)》

    (小米手机) (中兴手机) 在实际开发中,Google官方提供的时间选择器API已经不能满足于我们的需要了,所以很多公司都是采用自定义的形式来实现日期选择器. 这个例子很简单,定义三个NumberPi ...

  7. Spring扩展——Aware接口

    Aware接口 在Spring中有许多的Aware接口,提供给应用开发者使用,通过Aware接口,我们可以通过set的方式拿到我们需要的bean对象(包括容器中提供的一些对象,ApplicationC ...

  8. python pika rabbitmq demo

    import pika import json # https://www.cnblogs.com/zhaohuaxishi/p/12107392.html # https://www.cnblogs ...

  9. linux查看端口命令 lsof netstat

    [root@VM-4-3-centos /]# lsof -i:8881COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEnode 15526 roo ...

  10. Failed to connect to codeup.aliyun.com port 443 after 21017 ms: Couldn't connect to server Git

    Git拉取出现这个错误 Failed to connect to codeup.aliyun.com port 443 after 21017 ms: Couldn't connect to serv ...