start 继上一篇 整合两个images  完成 LNMP

github  https://github.com/shiphp/nginx-env     稍加修改

vim   dockerfile

# This is a commit

FROM shiphp/nginx-env:latest

MAINTAINER love coding <237356573@qq.com>

USER root

RUN  groupadd -g 1000 www &&  useradd -u1001 -g www  -M -s  /bin/nologin www

RUN  mkdir -p /usr/www/html && chown -R www:www /usr/www/html

RUN   rm -f /etc/nginx/conf.d/default.conf

COPY  default.conf  /etc/nginx/conf.d/default.conf

RUN   chown -R www:www /etc/nginx

EXPOSE 80

  

docker  build -t nginx:v1 .

vim  default.conf

server {
listen ;
index index.php index.html;
root /usr/www/html;
client_max_body_size 32M; location / {
try_files $uri /index.php?$args;
} location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass $ENV{"NGINX_HOST"}:;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
php :

docker run -d --name php-fpm-api -v /usr/local/nginx/www:/usr/www/html php-fpm:v6

nginx:

docker run -d --name nginx -d -p : -v /usr/local/nginx/www:/usr/www/html --link php-fpm-api -e NGINX_HOST=php-fpm-api nginx:v1

整合 nginx php-fpm的更多相关文章

  1. 记录一次自己对nginx+fastcgi(fpm)+mysql压力测试结果

    nginx + fastcgi(fpm) 压力测试: CentOS release 5.9 16核12G内存 静态页面: 并发1000,压测200秒,测试结果: 系统最大负载5.47 成功响应: 25 ...

  2. linux 下 整合 nginx 和 php

    一.整合nginx 和 PHP: # vi /usr/local/php/etc/php-fpm.conf 如果该文件不存在,有可能是默认的php-fpm.conf.default 可以使用命令拷贝一 ...

  3. FastDFS整合nginx后,nginx一直报错

    FastDFS整合nginx后,nginx一直报错: 报错内容: [2018-06-11 09:41:21] ERROR - file: ../common/fdfs_http_shared.c, l ...

  4. 深入理解PHP之:Nginx 与 FPM 的工作机制

    网络上有很多关于如何配置 Nginx + FPM 的文章,但它们更多从操作的角度出发,告诉我们怎么做,但却没有告诉我们为什么要这么做,本文从 Nginx 与 FPM 的工作机制出发,探讨配置背后的原理 ...

  5. centos-64整合nginx和tomcat

    centos-64整合nginx和tomcat 分类: Linux 2013-04-25 10:41 128人阅读 评论(0) 收藏 举报 1.安装wget和依赖包 yum install wget ...

  6. [Nginx] - PHP+FPM相关的配置

    CodeIgniter的配置: worker_processes ; events { worker_connections ; } http { include mime.types; defaul ...

  7. zabbix自定义key监控nginx和fpm(网站并发数)

    一. nginx编译参数 监控nginx,主要讲解监控并发数 --prefix=/usr/local/nginx --with-http_stub_status_module zabbix编译参数的查 ...

  8. CentOS单机安装FastDFS&整合Nginx

    单机安装 一 准备工作 准备linux服务器或虚拟机,这里是虚拟机,操作系统CentOS 6.4 Tracker 和 Storage 安装在一台机器上 FastDFS 5.08版本 1,准备软件 软件 ...

  9. nginx和fpm的进程数配置和502,504错误

    502 和 php-fpm.conf 1.php-cgi进程数不够用.php执行时间长,导致没有空闲进程处理新请求. 2.php-cgi进程死掉.php-fpm超时时间短,当前进程执行超时关闭连接. ...

随机推荐

  1. Codeforces 599D:Spongebob and Squares

    D. Spongebob and Squares time limit per test 2 seconds memory limit per test 256 megabytes input sta ...

  2. HDU 5568:sequence2 大数+DP

    sequence2  Accepts: 93  Submissions: 358  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 6553 ...

  3. CR LF CR/LF

    CR:Carriage Return,对应ASCII中转义字符 '\r' (0x0D),表示回车LF:Line Feed,对应ASCII中转义字符 '\n' (0x0A),表示换行CRLF:Carri ...

  4. python3 引入selenium库报错ModuleNotFoundError: No module named 'selenium'

    解决方法: pip install -U selenium

  5. Redis第一篇章 Hello Word!

    1.找到redis目录 2.在新建一个文件夹(myredis) 3.将redis.conf 进行复制到myredis 文件夹里面 4.启动redis redis-server /home/dc2-us ...

  6. python爬虫入门之快递查询

    现在快递遍布生活的角角落落,一个快递其实是信息的集合体,里面包含大量的物流信息,那能不能自己实现一个快递查询的小功能?答案是能的!现在也有别人整理好的快递查询api,比如说快递100,可以通过它提供的 ...

  7. 四、spring集成ibatis进行项目中dao层基类封装

    Apache iBatis(现已迁至Google Code下发展,更名为MyBatis)是当前IT项目中使用很广泛的一个半自动ORM框架,区别于Hibernate之类的全自动框架,iBatis对数据库 ...

  8. 十三、web应用中路径总结

    1.路径的编写形式:1)<a href="/项目名/资源路径"></a>    <!--超链接--> <form action=" ...

  9. Linux centosVMware MySQL主从介绍、准备工作、配置主、配置从、测试主从同步

    一.MySQL主从介绍 MySQL主从又叫做Replication.AB复制.简单讲就是A和B两台机器做主从后,在A上写数据,另外一台B也会跟着写数据,两者数据实时同步的 MySQL主从是基于binl ...

  10. vue - 封装input

    input子组件 <el-input :value="value" placeholder="请输入内容" size="small" ...