nginx

I have deployed pods withs its service and I am getting: failed to connect to port 80

ぃ、小莉子 提交于 2021-02-13 17:36:28
问题 I have a kubernetes cluster on GCP made of two nodes. I have pod -> mycha-deploy, with service -> mycha-svc, also I have pod nginx-controller with service nginx-svc. When I try to curl into the pods or services ips I keep getting: port 80 conection refused. When I browse into the master ip I don't get anything. Is there something I am missing in the configuration. Thank you. # mycha-deploy apiVersion: apps/v1 kind: Deployment metadata: name: mycha-deploy labels: app: mycha-app spec: replicas:

I have deployed pods withs its service and I am getting: failed to connect to port 80

你说的曾经没有我的故事 提交于 2021-02-13 17:34:36
问题 I have a kubernetes cluster on GCP made of two nodes. I have pod -> mycha-deploy, with service -> mycha-svc, also I have pod nginx-controller with service nginx-svc. When I try to curl into the pods or services ips I keep getting: port 80 conection refused. When I browse into the master ip I don't get anything. Is there something I am missing in the configuration. Thank you. # mycha-deploy apiVersion: apps/v1 kind: Deployment metadata: name: mycha-deploy labels: app: mycha-app spec: replicas:

Expose multiple api uri on the same nginx server block

情到浓时终转凉″ 提交于 2021-02-13 17:33:42
问题 Goal My goal is to setup multiple backend api container exposed on the same nginx server : http://localhost:80/api/account -> call http://account-service:9000/ http://localhost:80/api/cart -> call http://cart-service:9000/ http://localhost:80/api/order -> call http://order-service:9000/ http://localhost:80/api/product -> call http://product-service:9000/ ... My backend container are based on php:7.2-fpm (symfony hosted on every apache container) and they don't have any route called api/${NAME

Docker运行Nginx服务器

旧巷老猫 提交于 2021-02-13 11:50:00
一、获取Docker容器的Nginx镜像 二、创建Docker容器宿主机挂载目录 # 创建挂载目录,- v 显示创建的目录名 [root@idclooknet ~]# mkdir -vp /opt/docker_cfg/nginx/html /opt/docker_cfg/nginx/logs /opt/docker_cfg/nginx/conf 三、添加Nginx基本配置到挂载的配置文件 #新建nginx配置文件 nginx.conf,并添加配置 [root@idclooknet conf]# touch nginx.conf #nginx配置文件的配置如下 [root@idclooknet conf]# cat nginx.conf user nginx; worker_processes 1 ; error_log /var/log/nginx/ error.log warn; pid /var/run/ nginx.pid; events { worker_connections 1024 ; } http { include /etc/nginx/ mime.types; default_type application /octet- stream; log_format main ' $remote_addr - $remote_user [$time_local]

docker nginx 运行后无法访问

雨燕双飞 提交于 2021-02-13 10:55:59
1 最近在学docker部署,一开始打算将nginx先docker化的。 对照 官方的docker镜像介绍说明 ,进行自定义配置 将官方的nginx.conf复制出来后,修改添加了一些自定义,主要是屏蔽了default.conf,以及include文件夹 sites-available include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-available/*; 官方原先配置 user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';

一步步编写自己的PHP爬取代理IP项目(一)

拈花ヽ惹草 提交于 2021-02-13 09:54:54
第一章节主要给大家普及一下爬虫的概念以及相关的知识,让大家对后面的学习打下扎实的基础。如果你是 有经验的开发者 ,完全可以跳过第一章进入第二章的学习了。 这个项目主要围绕两大核心点展开: 1. PHP爬虫 2. 代理IP 咱们先讲讲什么是爬虫,简单来讲,爬虫就是一个探测机器,它的基本操作就是模拟人的行为去各个网站溜达,点点按钮,查查数据,或者把看到的信息背回来。就像一只虫子在一幢楼里不知疲倦地爬来爬去。 而我们最常见,用的最多的爬虫就是: 百度。 百度就是利用这种爬虫技术:每天放出无数爬虫到各个网站,把他们的信息抓回来,等着你去搜索。 还有各种类型的 抢票软件 ,每一个爬虫都帮助你不断刷新 12306 网站的火车余票。一旦发现有票,就马上买下来。 随着时代的发展,人们发现并不是所有的爬虫都像百度、抢票软件这种帮助到我们的生活,也有许多非法入侵的爬虫,这些爬虫不仅帮助不到我们,甚至会让我们的许多信息泄露。 人们十分憎恨这种爬虫,于是这就诞生了另一门技术, 反爬虫。 话说有一天,小明想去电影院看电影,但是不知道看哪一部电影好,于是他想从多个网站爬取一些影评来让自己更好的抉择看什么电影。于是小明写了标准的爬虫(基于HttpClient库),不断地遍历某站的电影下面的影评页面,根据 Html 分析电影名字存进自己的数据库。 但是电影网站的工作人员小红却不乐意了,你用爬虫把我们的影评爬走了

kubectl 命令

痴心易碎 提交于 2021-02-13 09:49:05
https://jimmysong.io/kubernetes-handbook/guide/using-kubectl.html 零、Options 选项 https://www.kubernetes.org.cn/doc-45 功能: 使用kubectl来管理Kubernetes集群。 可以在 https://github.com/kubernetes/kubernetes 找到更多的信息。 选项: --kubeconfig="": 命令行请求使用的配置文件路径。 --api-version="": 和服务端交互使用的API版本。 --certificate-authority="": 用以进行认证授权的.cert文件路径。 --client-certificate="": TLS使用的客户端证书路径。 --client-key="": TLS使用的客户端密钥路径。 --cluster="": 指定使用的kubeconfig配置文件中的集群名。 --context="": 指定使用的kubeconfig配置文件中的环境名。 --user="": 指定使用的kubeconfig配置文件中的用户名。 --insecure-skip-tls-verify[=false]: 如果为true,将不会检查服务器凭证的有效性,这会导致你的HTTPS链接变得不安全。 --match

Docker快速入门

纵饮孤独 提交于 2021-02-13 08:45:13
Docker已经火了很长一段时间,最近打算在 阿里云 上好好熟悉一下Docker的相关应用,为今后的工作做准备,希望如下图一样,Docker技术一飞冲天。 基本概念 Docker是基于Go语言实现的云开源项目,诞生于2013年初,最初发起者是dotCloud公司,其目标是“Build, Ship and Run Any App, Anywhere”,主要概念包括 镜像、容器、仓库 。Docker引擎的技术是Linux容器( Linux Containers , LXC)技术。容器有效地将由单个操作系统的资源划分到孤立的组中,以便更好地在孤立的组之间平衡有冲突的资源使用需求。 镜像Image :类似于虚拟机镜像,可以理解为面向Docker引擎的 只读模板 ,包括文件系统。 获取镜像: docker pull NAME[:TAG] 查看镜像信息: 查看所有镜像 docker images ;查看某个镜像具体信息 docker inspect 添加标签: docker tag xxx ubuntu:first 搜寻镜像: docker search xxx , -s=0 指定星级 删除镜像: docker rmi xxx ,一般情况下会删除镜像的标签,而不是文件,当删除最后一个TAG时则会删除文件,需要注意。 使用镜像ID删除镜像: -f 删除可以强制删除镜像

nginx+ffmpeg+jwplayer

百般思念 提交于 2021-02-13 08:36:09
播放监控的画面 RTSP(Real Time Streaming Protocol),实时流传输协议,是TCP/IP协议体系中的一个应用层协议,由哥伦比亚大学、网景和RealNetworks公司提交的IETF RFC标准。该协议定义了一对多应用程序如何有效地通过IP网络传送多媒体数据。RTSP在体系结构上位于RTP和RTCP之上,它使用TCP或RTP完成数据传输。HTTP与RTSP相比,HTTP传送HTML,而RTP传送的是多媒体数据。HTTP请求由客户机发出,服务器作出响应;使用RTSP时,客户机和服务器都可以发出请求,即RTSP可以是双向的。(管他说的啥,反正就是摄像头的协议,网页不能直接播)。 跟后台研究了几天,决定的实现方式是:nginx搭的服务器,ffmpeg转码,jwplayer播放。 一、FFmpeg下载:http://ffmpeg.zeranoe.com/builds/ 下载并解压FFmpeg文件夹,配置环境变量:在“Path”变量原有变量值内容上加上d:\ffmpeg\bin,验证:ffmpeg -version 出现版本号则成功。 二、官网下载windows Stable version版Nginx安装nginx服务器,配置:config和mime.types。 1.在nginx\conf\nginx.conf中: http { include mime

实战笔记 | 在k3s集群、kubernetes集群安装部署ingress-nginx

天涯浪子 提交于 2021-02-13 07:45:54
先看效果 kubectl apply -f deploy.yaml 执行上面的命令后,通过netstat -nltp 确认本机80、443是nginx进程在监听 apiVersion : v1 kind : Namespace metadata : name : ingress-nginx labels : app.kubernetes.io/name : ingress-nginx app.kubernetes.io/instance : ingress-nginx --- # Source: ingress-nginx/templates/controller-serviceaccount.yaml apiVersion : v1 kind : ServiceAccount metadata : labels : helm.sh/chart : ingress-nginx-2.0.3 app.kubernetes.io/name : ingress-nginx app.kubernetes.io/instance : ingress-nginx app.kubernetes.io/version : 0.32.0 app.kubernetes.io/managed-by : Helm app.kubernetes.io/component : controller name :