论坛
潜水/灌水快乐,沉淀知识,认识更多同行。
ToB圈子
加入IT圈,遇到更多同好之人。
朋友圈
看朋友圈动态,了解ToB世界。
ToB门户
了解全球最新的ToB事件
博客
Blog
排行榜
Ranklist
文库
业界最专业的IT文库,上传资料也可以赚钱
下载
分享
Share
导读
Guide
相册
Album
记录
Doing
搜索
本版
文章
帖子
ToB圈子
用户
免费入驻
产品入驻
解决方案入驻
公司入驻
案例入驻
登录
·
注册
只需一步,快速开始
账号登录
立即注册
找回密码
用户名
Email
自动登录
找回密码
密码
登录
立即注册
首页
找靠谱产品
找解决方案
找靠谱公司
找案例
找对的人
专家智库
悬赏任务
圈子
SAAS
ToB企服应用市场:ToB评测及商务社交产业平台
»
论坛
›
软件与程序人生
›
后端开发
›
Java
›
Nginx-04-Docker Nginx
Nginx-04-Docker Nginx
没腿的鸟
金牌会员
|
2024-5-21 08:57:49
|
显示全部楼层
|
阅读模式
楼主
主题
871
|
帖子
871
|
积分
2613
Docker Nginx 实战
HTTP 服务
Nginx 的最大作用,就是搭建一个 Web Server。
有了容器,只要一行命令,服务器就架设好了,完全不用配置。
运行官方 image
$ docker container run \
-d \
-p 8080:80 \
--rm \
--name mynginx \
nginx
复制代码
参数阐明:
-d:在后台运行
-p :容器的80端口映射到127.0.0.1:8080
--rm:容器停止运行后,自动删除容器文件
--name:容器的名字为mynginx
复制代码
访问
打开
http://127.0.0.1:8080/
内容如下:
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.
Thank you for using nginx.
复制代码
映射网页目录
$ docker container run \
-d \
-p 127.0.0.1:8080:80 \
--rm \
--name mynginx \
--volume "$PWD":/usr/share/nginx/html \
nginx
复制代码
直接访问
http://127.0.0.1:8080/
,即可看到 index.html 内容。
拓展阅读
docker 入门
nginx 系列
Nginx-01-聊一聊 nginx
Nginx-01-Nginx 是什么
Nginx-02-为什么利用 Nginx
Nginx-02-Nginx Ubuntu 安装 + windows10 + WSL ubuntu 安装 nginx 实战条记
Nginx-02-基本利用
Nginx-03-Nginx 项目架构
Nginx-04-Docker Nginx
Nginx-05-nginx 反向代理是什么?windows 下如何配置利用 nginx
Nginx-06-nginx 汇总入门先容
Nginx R31 doc 官方文档-01-nginx 如何安装
Nginx R31 doc-02-nginx 基本功能
Nginx R31 doc-03-HTTP Load Balancing HTTP 负载平衡
Nginx R31 doc-04-HTTP Health Checks
Nginx R31 doc-05-Dynamic Configuration of Upstreams with the NGINX Plus API 利用 NGINX Plus API 动态配置上游服务器
Nginx R31 doc-06-Accepting the PROXY Protocol
Nginx R31 doc-07-内容缓存
Nginx R31 doc-08-Configuring NGINX and NGINX Plus as a Web Server 配置 NGINX 和 NGINX Plus 作为 Web 服务器
Nginx R31 doc-09-Serving Static Content 静态内容
Nginx R31 doc-10-NGINX Reverse Proxy 反向代理
Nginx R31 doc-11-Compression and Decompression 压缩与解压缩
Nginx R31 doc-12-NGINX SSL Termination 安全加密
Nginx R31 doc-13-Limiting Access to Proxied HTTP Resources 访问限流
Nginx R31 doc-14-Dynamic Denylisting of IP Addresses 动态拒绝IP地点
Nginx R31 doc-15-Live Activity Monitoring 实时活动监控
Nginx R31 doc-16-logging 配置日志
Nginx R31 doc-17-debugging 调试
Nginx R31 doc-18-High Availability Support for NGINX Plus in On-Premises Deployments
Nginx 实战-01-nginx ubuntu 安装条记
Nginx 实战-01-nginx windows 安装条记
Nginx 实战-02-nginx proxy_pass 服务代理访问 利用条记 ubuntu nodejs
Nginx 实战-03-nginx 负载平衡
Nginx 实战-04-nginx 差异的地点访问差异的服务
Nginx 实战-05-nginx 反向代理实现域名到指定的 ip
参考资料
https://nginx.org/en/
http://wiki.jikexueyuan.com/project/nginx/characteristics.html
http://www.ruanyifeng.com/blog/2018/02/nginx-docker.html
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复
使用道具
举报
0 个回复
正序浏览
返回列表
快速回复
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
or
立即注册
本版积分规则
发表回复
回帖并转播
发新帖
回复
没腿的鸟
金牌会员
这个人很懒什么都没写!
楼主热帖
iOS全埋点解决方案-采集崩溃 ...
CVE-2022-23131 Zabbix SAML SSO认证绕 ...
【ollama】Linux下更改ollama模型下载 ...
同一个网络下两台设备看直播时,进度不 ...
ManageEngine ServiceDesk Plus之CVE漏 ...
Doris(七) -- 修改表、动态和临时分区 ...
Redis事务
iOS 苹果集成登录及苹果图标的制作要求 ...
北斗授时产品(GPS北斗授时设备)加NTP ...
【密码管理器】上海道宁为您提供存储和 ...
标签云
存储
挺好的
服务器
浏览过的版块
.Net
快速回复
返回顶部
返回列表