I'm having trouble generating a certificate. Not sure what's wrong because the app works fine with the fallback self-signed cert.
nginx_1 | 127.0.0.1 - - [10/Jan/2019:18:06:30 +0000] "POST /clean-challenge HTTP/1.1" 200 5 "-" "curl/7.61.1"
nginx_1 | 2019/01/10 18:06:30 [error] 23#23: *139 [lua] lets_encrypt.lua:41: issue_cert(): auto-ssl: dehydrated failed: env HOOK_SECRET=XXX HOOK_SERVER_PORT=8999 /usr/local/openresty/luajit/bin/resty-auto-ssl/dehydrated --cron --accept-terms --no-lock --domain influencers.cloud --challenge http-01 --config /etc/resty-auto-ssl/letsencrypt/config --hook /usr/local/openresty/luajit/bin/resty-auto-ssl/letsencrypt_hooks status: 256 out: # INFO: Using main config file /etc/resty-auto-ssl/letsencrypt/config
nginx_1 | Processing influencers.cloud
nginx_1 | + Signing domains...
nginx_1 | + Generating private key...
nginx_1 | + Generating signing request...
nginx_1 | + Requesting challenge for influencers.cloud...
nginx_1 | + Responding to challenge for influencers.cloud...
nginx_1 | Invalid challenge: DOMAIN=influencers.cloud RESPONSE={
nginx_1 | "type": "http-01",
nginx_1 | "status": "invalid",
nginx_1 | "error": {
nginx_1 | "type": "urn:acme:error:connection",
nginx_1 | "detail": "Fetching https://influencers.cloud/.well-known/acme-challenge/YYY: Timeout after connect (your server may be slow or overloaded)",
nginx_1 | "status": 400
nginx_1 | },
nginx_1 | "uri": "https://acme-v01.api.letsencrypt.org/acme/challenge/ZZZ",
nginx_1 | "token": "YYY",
nginx_1 | "validationRecord": [
nginx_1 | {
nginx_1 | "url": "http://influencers.cloud/.well-known/acme-challenge/YYY",
nginx_1 | "hostname": "influencers.cloud",
nginx_1 | "port": "80",
nginx_1 | "addressesResolved": [
nginx_1 | "34.73.89.237"
nginx_1 | ],
nginx_1 | "addressUsed": "34.73.89.237"
nginx_1 | },
nginx_1 | {
nginx_1 | "url": "https://influencers.cloud/.well-known/acme-challenge/YYY",
nginx_1 | "hostname": "influencers.cloud",
nginx_1 | "port": "443",
nginx_1 | "addressesResolved": [
nginx_1 | "34.73.89.237"
nginx_1 | ],
nginx_1 | "addressUsed": "34.73.89.237"
nginx_1 | }
nginx_1 | ]
nginx_1 | }
nginx_1 | err: # !! WARNING !! Extra configuration directory /etc/resty-auto-ssl/letsencrypt/conf.d exists, but no configuration found in it.
nginx_1 | , context: ssl_certificate_by_lua*, client: 34.73.89.237, server: 0.0.0.0:443
nginx_1 | 2019/01/10 18:06:30 [error] 23#23: *139 [lua] ssl_certificate.lua:92: issue_cert(): auto-ssl: issuing new certificate failed: dehydrated failure, context: ssl_certificate_by_lua*, client: 34.73.89.237, server: 0.0.0.0:443
nginx_1 | 2019/01/10 18:06:30 [error] 23#23: *139 [lua] ssl_certificate.lua:256: auto-ssl: could not get certificate for influencers.cloud - using fallback - failed to get or issue certificate, context: ssl_certificate_by_lua*, client: 34.73.89.237, server: 0.0.0.0:443
nginx_1 | 2019/01/10 18:06:32 [error] 23#23: *144 [lua] lets_encrypt.lua:41: issue_cert(): auto-ssl: dehydrated failed: env HOOK_SECRET=XXX HOOK_SERVER_PORT=8999 /usr/local/openresty/luajit/bin/resty-auto-ssl/dehydrated --cron --accept-terms --no-lock --domain influencers.cloud --challenge http-01 --config /etc/resty-auto-ssl/letsencrypt/config --hook /usr/local/openresty/luajit/bin/resty-auto-ssl/letsencrypt_hooks status: 256 out: # INFO: Using main config file /etc/resty-auto-ssl/letsencrypt/config
events {
worker_connections 1024;
}
http {
include resty-http.conf;
server {
listen 443 ssl;
server_name influencers.cloud;
include resty-server-https.conf;
location / {
proxy_read_timeout 120;
proxy_set_header Host $http_host;
proxy_set_header Authorization "";
proxy_set_header User-Agent $http_user_agent;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://frontend:8000;
}
location /api/static {
gzip on;
alias /www/data/static/;
}
location /media {
gzip on;
alias /www/data/media/;
}
}
server {
listen 443 ssl;
server_name www.influencers.cloud;
include resty-server-https.conf;
return 301 https://influencers.cloud$request_uri;
}
server {
listen 80 default_server;
server_name ~^(www\.)?influencers.cloud$;
include resty-server-http.conf;
return 301 https://influencers.cloud$request_uri;
}
}
nginx:
build: nginx
environment:
ALLOWED_DOMAINS: 'influencers.cloud'
volumes:
- ./backend/.media:/www/data/media
- ./backend/.static:/www/data/static