首先检查Nginx是否启动成功 [root@web1 extra]# ps aux|grep nginx (一切正常)root 3269 0.0 0.1 46764 1464 ? Ss 09:34 0:00 nginx: master process nginx -c /application/ng ...
分类:
其他好文 时间:
2021-06-20 18:09:23
阅读次数:
0
创建 Nginx 容器 docker run --name nginx-demo -p 8080:80 -d nginx 参数说明: --name nginx-demo:容器名称 -p 8080:80: 端口进行映射,将本地 8080 端口映射到容器内部的 80 端口 -d nginx: 设置容器在 ...
分类:
其他好文 时间:
2021-06-20 17:51:22
阅读次数:
0
nginx 命令和信号 nginx命令 nginx 命令支持向其发送信号,实现不同功能 nginx 格式 nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives] 选项说明 帮助: -? -h 使用指定的配置文件: ...
分类:
Web程序 时间:
2021-06-20 17:47:57
阅读次数:
0
一,apt方式安装php 说明:用apt方式安装适用于本地开发环境,如果是线上生产环境,建议下载软件后编译安装 root@lhdpc:~# apt-get install php 查看结果: root@lhdpc:~# php -v PHP 7.4.16 (cli) (built: Mar 23 2 ...
分类:
数据库 时间:
2021-06-20 17:46:30
阅读次数:
0
原理模型 准备工作 查看是否安装成功 查看 keepalived配置文件 查看keepalived.conf配置文件 //查看服务器网卡 检测脚本配置 ...
分类:
其他好文 时间:
2021-06-19 19:23:54
阅读次数:
0
一、问题描述 容器中修改了/etc/hosts文件。手动测试已经生效。但是容器中的项目却还是访问的公网。 二、问题解决 修改dockerfile。在dockerfile中添加/etc/nsswitch.conf文件 RUN [ ! -e /etc/nsswitch.conf ] && echo 'h ...
分类:
其他好文 时间:
2021-06-18 20:07:20
阅读次数:
0
参数说明: #:注解 FROM:基于镜像。 MAINTAINER:指定镜像的作者信息,包含镜像的所有者和联系人信息。 RUN:用于指定构建镜像时运行的命令。 COPY:复制指令,从上下文目录中复制文件或者目录到容器里指定路径。 ENV:设置环境变量,定义了环境变量,那在后续的指令中,就可以使用这个环 ...
分类:
其他好文 时间:
2021-06-18 18:52:57
阅读次数:
0
一、安装(基于docker-compose) 使用docker安装Nginx非常简单,只需要准备如下YML文件即可: version: "3" services: nginx12: restart: always image: daocloud.io/library/nginx:1.12.0 con ...
分类:
其他好文 时间:
2021-06-17 16:49:40
阅读次数:
0
文章目录: 目标镜像 GolangAlpine 端口映射 占用本地端口 8081 备注 Dockerfile 文章使用到的软件: Mac 12.0 Beta(macOS Monterey),处理器为:M1Portainer.io:2.5.1Docker:20.10.6 目标 快速部署 Golang ...
分类:
其他好文 时间:
2021-06-17 16:45:18
阅读次数:
0
函数的定义 # 方式一 start () { echo "nginx start .... [OK]" #return 0 } stop () { echo "nginx stop .... [FAIL]" } # 方式二 function start { echo "nginx start ... ...
分类:
其他好文 时间:
2021-06-17 16:37:05
阅读次数:
0