eugene-khyst/letsencrypt-docker-compose

nginx error

sutirath opened this issue · 6 comments

nginx: [emerg] open() "/etc/nginx/vhosts/"mydomain".conf" failed (2: No such file or directory) in /etc/nginx/sites/"mydomain".conf:27
nginx_1 | Checking configuration for "mydomain"
nginx_1 | Waiting for Let's Encrypt certificates for "mydomain"
nginx_1 | 2022/05/28 07:48:28 [emerg] 1#1: open() "/etc/nginx/vhosts/"mydomain".conf" failed (2: No such file or directory) in /etc/nginx/sites/"mydomain"

@sutirath
It looks like the problem is in double quotes " - "mydomain".
Could you please share your config.env file?
What operating system do you use?
What version of Docker Compose?
Do you use docker compose plugin or docker-compose binary?

Before

DOMAINS="mydomain"
CERTBOT_EMAILS="mydomain"
CERTBOT_TEST_CERT=1
CERTBOT_RSA_KEY_SIZE=4096

After

DOMAINS=mydomain
CERTBOT_EMAILS=mydomain
CERTBOT_TEST_CERT=1
CERTBOT_RSA_KEY_SIZE=4096

it work but show new error

Domain: mydomain
certbot_1  |   Type:   unauthorized
certbot_1  |   Detail: 209.99.40.222: Invalid response from http://mydomain/.well-known/acme-challenge/binA6tKJqQmubNaKLL41Kttm5J4P_RkWcelFwesSV6E: 404

DOMAINS=mydomain must be a valid domain that you own and CERTBOT_EMAILS=mydomain must be a valid email.
If you buy the domain siturath.com then the config will be:

DOMAINS=siturath.com
CERTBOT_EMAILS=siturath@gmail.com

i have set

mydomail = takeco.online

DOMAINS="customer.takeco.online"
CERTBOT_EMAILS="info@takeco.online"
CERTBOT_TEST_CERT=1
CERTBOT_RSA_KEY_SIZE=4096

And does it work now? What is the problem in logs?

Anyway, thanks for raising the issue. I updated the README regarding the usage of double quotes - d102ab1