Tag: nginx

在Mac主机上的Docker-machine的容器联系人应用程序

我有一台Docker-machine的Mac笔记本电脑,用nginx和其他容器上的其他应用程序运行一个容器。 我可以通过主机虚拟机 – >通过nginx容器 – >到应用程序容器中联系我的应用程序。 我想让应用程序联系在我的Mac上运行的另一个应用程序(用于debugging)。 这可能吗?

PEPS邮件,smtp能够发送外部电子邮件,但没有收到

我目前正在尝试在我的服务器上设置PEPS ,并且在接收来自外部地址的电子邮件时遇到问题。 我可以在内部发送和接收电子邮件,我也可以在外部发送电子邮件,但我永远不会收到从外部地址发送的电子邮件。 我可以telnet到端口25,但我明白了 connection to host lost 在……的最后 HELO example.co.uk MAIL FROM: address@other.co.uk RCPT TO: aname@example.co.uk DATA Subject: Test <ENTER> test Message . 我input'。'后 我立即获得connection to host lost消息 我的服务器设置使用nginx,有多个子域,我有PEPS运行在mail.example.co.uk通过反向代理,并且这个位工作正常。

Nginx与docker不工作的Web应用程序

我正在尝试在docker中为我的react / flux webapp设置一个容器。 我决定去与一个nginx服务器来处理聆听和路由。 这是nginx的web.confconfiguration文件 server { listen 80; location / { root /www/web_files; try_files $uri $uri/ /index.html =404; index index.html; add_header expires off; } } 现在,我在docker的一个amazon节点上部署了这个节点,并且可以在VM的公共IP上访问它。 http://54.238.176.11 现在,我想设置我的/ www / web_files目录,其中nginx将search$ uri或index.html 这是我的我的容器for web_files泊坞窗文件。 我将它部署在与我的nginx服务器相同的节点上。 FROM ubuntu RUN apt-get update RUN apt-get -y install bash git openssh-client g++ gcc libc6-dev make curl RUN […]

如何使fail2ban读取json docker日志

是否可以configuration我的fail2ban jail.conf来检查docker日志而不是挂载主机上的日志。 例如将日志path设置为容器日志的path。 Jail.conf: … #example [nginx-http-auth] enabled = true filter = nginx-http-auth port = http,https logpath = /var/lib/docker/containers/819564257d4*/*e0923e-json.log … 但这并没有太大的作用,因为docker logs命令和日志文件之间有一点区别: # docker logs @nginx_container_name 2016/03/23 12:39:52 [error] 6#6:* 350上游过早closures连接,同时读取来自上游的响应头,客户端: @ ATTACKER_IP ,服务器: @MY_DNS ,请求:“GET / Blog / wp-login .php HTTP / 1.1“,上游:” http://172.17.0.3:8001/Blog/wp-login.php “,主机:” @MY_IP:80“ @ATTACKER_IP – – [23 / Mar / 2016:12: […]

Docker中的Nginx无法使用map指令

我尝试通过使用map指令来重构我的docker nginxconfiguration文件。 但是,当我从: server { listen 80; server_name www.DOMAIN.docker; root /var/www; index index.html index.php; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass fpm:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; } } server { listen 80; server_name debug.DOMAIN.com.docker; root /var/www; index index.html index.php; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass fpmwithxdebug:9000; fastcgi_index index.php; […]

状态405 – docker – artifactory

将图片推送到docker artifactory时出现以下错误: v1 : Error: Status 405 trying to push repository abc-docker-local: "{\n \"errors\" : [ {\n \"status\" : 405,\n \"message\" : \"Method Not Allowed\"\n } ]\n}" 我使用nginx。 我的configuration文件如下所示: server_name localserver; rewrite ^ remoteserver/artifactory/api/docker/abc-docker-local/v1 redirect; if ($http_x_forwarded_proto = '') { set $http_x_forwarded_proto $scheme; } location / { proxy_read_timeout 900; proxy_pass_header Server; proxy_cookie_path ~*^/.* /; proxy_pass […]

dockerregistryv2上传失败的一些图像

我在aws(acc和prod)上运行coreos上的两个kubernetes集群,并且都在nginx ssl(买了wildcart证书,选中ok)的terminal前往v1 + v2后端设置了一个自定义的registry,并且一切正常。 不知何故,我现在有一个问题,一个特定的版本不会上传。 另一个图像上传很好…一次又一次我看到相同的行为。 我build立的两个图像是WEB(虚拟大小约390 MB)和API(虚拟大小约420 MB)。 造成exception的是WEB图像,只是稍大一些,所以我没有看到那里的问题。 al再次运行良好,直到这个特定的图像出现。 我已经创build了不同大小的新版本,但它不会上传。 之后,其他的图片上传,进入同一个存储库,这是什么使这个案例如此有趣(让我疯了;)。 我不认为这是aws ssl elb设置的问题,因为我在nginx容器中进行ssl终止,所有其他服务在同一个体系结构中运行良好。 为了回应未来的问题,为什么v1后端是必要的:它需要容纳wercker,它仍然在v1后端。 registry然后将stream量redirect到v2后端,图像被存储在这里。 registry(v1和v2显示)的日志显示以下输出(按此顺序): PUT / v1 / repositories / web / 01 / Apr / 2016:09:47:41 +0000 DEBUG:args = {'namespace':'library','repository':u'xxxxx'} POST / v2 / xxxxx / blobs / uploads / time =“2016-04-01T10:07:31Z”level = info msg =“response completed”go.version = go1.5.3 […]

有问题使用nginx代理+ dockergen在主机端口80上运行节点服务器?

基本上我试图设置我的节点应用程序由nginx在我的docker机器的http://192.168.99.100/ ,而不是绕过nginx和做像http://192.168.99.100:7777/通过发布端口7777到主机。 我目前正试图服务我的docker机器的根,我的frontend节点应用程序容器,即http://192.168.99.100/ 。 我使用dockergen和nginx(单独的容器)一起来自动生成这个。 从Dockerfile构build的我的节点应用程序在以下地址和端口localhost:7777运行npm run dev:no-debug 。 我有以下的撰写文件。 version: '2' services: frontend: build: context: ./frontend volumes: – ./frontend:/usr/src/app – /usr/src/app/node_modules expose: – "7777" environment: – "PORT=7777" – "VIRTUAL_HOST=192.169.99.100" nginx_proxy: image: nginx container_name: nginx_proxy ports: – "80:80" – "443:443" links: – frontend volumes: – /tmp/nginx:/etc/nginx/conf.d – ./nginx/certs:/etc/nginx/certs dockergen: image: jwilder/docker-gen container_name: dockergen volumes_from: – […]

如何使用nginx前端运行两个Docker容器的两个WordPress站点。

我有两个wordpress实例,每个运行一个docker容器。 我想通过一个nginx服务器前端/代理这两个wordpress实例。 以下是我的nginxconfiguration文件。 upstream docker-site1 { server site1_site; } upstream docker-site2 { server site2_site; } server { listen 80; server_name myserver.domain.com; proxy_set_header Host "myserver.domain.com"; # required for Docker client sake proxy_set_header X-Real-IP $remote_addr; #pass on real client IP client_max_body_size 0; # disable any limits to avoid HTTP 413 for large image uploads # required to […]

Docker撰写networking:nginx中的主机名不parsing

我试图迁移我的堆栈使用版本2的docker-compose.yml,并遇到networking主机名未被nginx解决的问题。 我的堆栈包含一个nginx反向代理(在debian上:wheezy),它通过其他几个软件组件来提供安全内容,我不会详细讨论(参见下面的configuration)。 在版本1 yaml中,我使用docker链接的环境variables和LUA脚本一起将它们插入到nginx.conf(使用nginx-extras)中。 这在Docker容器的前面作为一个反向代理完美运行。 在版本2 yaml中,我使用由dockernetworking生成的主机名。 我能够成功地从容器内ping这些主机名,但是nginx无法解决它们。 2016/05/04 01:23:44 [error] 5#0: *3 no resolver defined to resolve ui, client: 10.0.2.2, server: , request: "GET / HTTP/1.1", host: "localhost" 这是我目前的configuration: 泊坞窗,compose.yml: version: '2' services: # back-end api: build: . depends_on: – db – redis – worker environment: RAILS_ENV: development ports: – "3000:3000" volumes: – ./:/mmaps […]