首页 > 编程知识 正文

docker菜鸟教程常用指令,常用docker命令

时间:2023-05-05 03:37:50 阅读:20023 作者:2955

1. nginx介绍

2 .显示验证2. nginx常规命令配置是否正确的:nginx-tnginx的详细版本号。 显示nginx -Vnginx的简要版本号。 nginx-v启动Nginx:start nginx快速停止或关闭Nginx:nginx -s stop正常停止或关闭uit配置文件更改重新装载命令: nginx -s reload 3. nginx配置3.3 工作器_ processes 1; 事件{ worker _ connections 1024; }http { include mime.types; efault _ type应用程序/octet-stream; sendfile on; keepalive_timeout 65; #1startupstreamlinuxidc {服务器本地主机:7071; 服务器本地主机:7072; 服务器本地主机:7073; }服务器{ listen 7070; server_name localhost; 位置/{ # root c :/ng test 2; # index index.html index.htm; proxy_pass http://linuxidc; } } # 1结束# 2开始服务器{ listen 7071; server_name localhost; 位置/{根c :/ng测试1; # index index.html index.htm; #proxy_pass https://tms; # proxy _ pass https://www.Baidu.com/} server { listen 7072; server_name localhost; 位置/{根c :/ng测试2; # index index.html index.htm; #proxy_pass https://tms; }服务器{ listen 7073; server_name localhost; 位置/{根c :/ng测试3; # index index.html index.htm; #proxy_pass https://tms; } } #2end # 3开始服务器{ listen 8080; server_name localhost; #charset koi8-r; # access _ loglogs/host.access.log main; # location/{ # root c :ng测试; #index index.html index.htm; # proxy _ pass https://www.Baidu.com/# } location/Baidu { # root html; #index index.html index.htm; proxy _ pass https://www.Baidu.com/} location/csdn { # root html; #index index.html index.htm; proxy _ pass https://www.csdn.net/} error _ page 500502503504/50x.html; location=/50x.html {根html; } # 3结束} } 3.2代码说明和效果图3.2.1端口代理APP应用程序# 2开始服务器{侦听7071; server_name localhost; 位置/{根c :/ng测试1; # index index.html index.htm; #proxy_pass https://tms; # proxy _ pass https://www.Baidu.com/} server { listen 7072; server_name localhost; 位置/{根c :/ng测试2; # index index.html index.htm; #proxy_pass https://tms; }服务器{ listen 7073; server_name localhost; 位置/{根c :/ng测试3; # index index.html index.htm; #proxy_pass https://tms; } }# 2 end 3.2.2效果图

3.2.3具有相同端口号的代理不同的APP应用程序#3 start server { listen 8080; server_name localhost; #charset koi8-r; # access _ loglogs/host.access.log main; # location/{ # root c :ng测试; #index index.html index.htm; # proxy _ pass https://www.Baidu.com/# } location/Baidu { # root html; #index index.html index.htm; proxy _ pass https://www.Baidu.com/} location/csdn { # root html; #index index.html index.htm; proxy _ pass https://www.csdn.net/} error _ page 500502503504/50x.html; location=/50x.html { root html; } # 3 end 3.2.4效果图

3.2.5负载均衡的默认轮询方法

#1startupstreamlinuxidc {服务器本地主机:7071; 服务器本地主机:7072; 服务器本地主机:7073; }服务器{ listen 7070; server_name localhost; 位置/{ # root c :/ng test 2; # index index.html index.htm; proxy_pass http://linuxidc; } }# 1 end 3.2.6效果图

3358www.Sina.com/,IT技术与相关干货共享,回复关键词获取对应干货,发送更多知识请关注公众号:「软件老王」,必看十本《武功秘籍》;java,发送100多万张商用高清图片; 3358www.Sina.com/毕业后马上发送能拿到月薪“20k”的java面试问题,“图片”、“3358www.Sina.com/”等继续更新中

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。