nginx: [emerg] no servers are inside upstream
See original GitHub issueHi all, I try to use nginx-proxy, but doesn’t works.
docker exec -ti nginx-proxy bash
root@2913f58b4a98:/app# nginx -t
2017/06/02 14:07:50 [emerg] 73#73: no servers are inside upstream in /etc/nginx/conf.d/default.conf:50
nginx: [emerg] no servers are inside upstream in /etc/nginx/conf.d/default.conf:50
nginx: configuration file /etc/nginx/nginx.conf test failed
here the /etc/nginx/conf.d/default.conf
29 # HTTP 1.1 support
30 proxy_http_version 1.1;
31 proxy_buffering off;
32 proxy_set_header Host $http_host;
33 proxy_set_header Upgrade $http_upgrade;
34 proxy_set_header Connection $proxy_connection;
35 proxy_set_header X-Real-IP $remote_addr;
36 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
37 proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
38 proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;
39 proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
40 # Mitigate httpoxy attack (see README for details)
41 proxy_set_header Proxy "";
42 server {
43 server_name _; # This is just an invalid value which will never trigger on a real hostname.
44 listen 80;
45 access_log /var/log/nginx/access.log vhost;
46 return 503;
47 }
48 # mail.plusdispo.docker
49 upstream mail.plusdispo.docker {
50 }
51 server {
52 server_name mail.plusdispo.docker;
53 listen 80 ;
54 access_log /var/log/nginx/access.log vhost;
55 location / {
56 proxy_pass http://mail.plusdispo.docker;
57 }
58 }
59 # plusdispo.docker
60 upstream plusdispo.docker {
61 }
62 server {
63 server_name plusdispo.docker;
64 listen 80 ;
65 access_log /var/log/nginx/access.log vhost;
66 location / {
67 proxy_pass http://plusdispo.docker;
68 }
69 }
Do you have an idea ?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Issues - GitHub
conf generation seems to fail and results in an empty upstream configuration. Steps to Reproduce. I use this minimal example: version: '2' ...
Read more >AWS ECS jwilder/nginx-proxy fails to generate servers inside ...
It now returns the default nginx page because the nginx config file failed to generate a valid config because the upstream hosts are...
Read more >Docker nginx: [emerg] host not found in upstream “web:3000”
I released my reactJs application. I have code information as below. But I get the error “11 # 11: host not found in...
Read more >Avoiding the Top 10 NGINX Configuration Mistakes
The fix is to enable keepalive connections between NGINX and upstream servers – instead of being closed when a request completes, the connection ......
Read more >Docker compose : Nginx reverse proxy with multiple containers
After defining the upstream servers, we need to tell NGINX how to listen and how ... no URI is given at the end...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank @Neilpang I have found a workaround. Add in my DockerCompose file this :
network_mode: bridge
on each service.@quadeare
Here is a PR, https://github.com/jwilder/nginx-proxy/pull/849