acme-companion: 503 + upstream missing ip
Hello. I have followed installation instructions and successfully started containers. But when i try to open url i get 503 unaval and on https i didn’t get any response.
Here is conf.d/defautl.conf
# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
# scheme used to connect to this server
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
default $http_x_forwarded_proto;
'' $scheme;
}
# If we receive Upgrade, set Connection to "upgrade"; otherwise, delete any
# Connection header that may have been passed to this server
map $http_upgrade $proxy_connection {
default upgrade;
'' close;
}
gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
log_format vhost '$host $remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
access_log off;
# HTTP 1.1 support
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
# Mitigate httpoxy attack (see README for details)
proxy_set_header Proxy "";
server {
server_name _; # This is just an invalid value which will never trigger on a real hostname.
listen 80;
access_log /var/log/nginx/access.log vhost;
return 503;
}
upstream autobazaris.sk {
}
server {
server_name autobazaris.sk;
listen 80 ;
access_log /var/log/nginx/access.log vhost;
return 301 https://$host$request_uri;
}
server {
server_name autobazaris.sk;
listen 443 ssl http2 ;
access_log /var/log/nginx/access.log vhost;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers xxx;
ssl_prefer_server_ciphers on;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:50m;
ssl_certificate /etc/nginx/certs/autobazaris.sk.crt;
ssl_certificate_key /etc/nginx/certs/autobazaris.sk.key;
ssl_dhparam /etc/nginx/certs/autobazaris.sk.dhparam.pem;
add_header Strict-Transport-Security "max-age=31536000";
include /etc/nginx/vhost.d/default;
location / {
proxy_pass http://autobazaris.sk;
}
}
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (3 by maintainers)
Ok, I take that back.
It actually helps! I’ve just made another mistake that did result in the same error. 😄.
So what I did is the following. I used docker-compose v2 and the example you linked in your readme. https://github.com/fatk/docker-letsencrypt-nginx-proxy-companion-examples
There is one mistake that shows the same empty upstream block. The docker-gen container MUST be added to the
proxy-tiernetwork. But if I just add the container to the network, it still shows an empty upstream. But removing-only-exposednow makes the difference! I don’t really know whats going on behind the scenes but it works for me.Correct docker-gen block:
I also don’t know what
-wait 5s:30sis for. It works with and without.Hope it helps anyone
I was also able to bypass this issue using @SnowMB solution. Examples here:
https://gist.githubusercontent.com/SnowMB/758bb6c993372111629f4e86c0e1de1a/raw/b1e6d4454ef4af302eca19061bebbd573725d96f/docker-compose.yml https://gist.githubusercontent.com/SnowMB/87c5360f9bf81925af26c31f6d71410e/raw/fc8784d1cbc8ad56047b10630b68c1830859bf63/nginx.tmpl