Open CharlesRngrd opened 4 years ago
Same problem
I found error happens because of default nginx images doesn't supply long domain names.
To fix it, you should build own image based on nginx:1.15-alpine (or newer version) and copy modified nginx.conf with added server_names_hash_bucket_size 64;
.
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
server_names_hash_bucket_size 64;
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"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
Don't forget to change docker-compose.yml to build and use your nginx image.
The bash script is not properly wrote for supporting multi-domain LE certificate request. So this another small fix of init-letsencrypt.sh. hope can help.
Hi,
I would like to create SSL certificate for both a domain and a subdomain but it failed :
There error is the following for the 4 challenges :
That is weird because when I first execute the script with domains set to (api.charles.cool www.api.charles.cool) and then set to (charles.cool www.charles.cool) it works fine.
I don't know where the error comes from...
Do you have any idea ?
Have a nice day