Skip to content

nginx: [emerg] cannot load certificate "/etc/certs/"myapp.local".pem" #77

@d41sys

Description

@d41sys

I just create certs by ./create_cert.sh but it requires mkcert. So, I use brew install mkcert and create the certs folder successfully. And this forwards to the problem VARIABLE is not set. After resetting the terminal, I meet this issue.

$ docker-compose ps
           Name                          Command                 State                                            Ports                                      
-------------------------------------------------------------------------------------------------------------------------------------------------------------
6137b00f87eb_myapp-mysql      docker-entrypoint.sh --low ...   Up           0.0.0.0:3306->3306/tcp,:::3306->3306/tcp                                         
6cc6aea5d1cd_myapp-composer   /docker-entrypoint.sh composer   Exit 0                                                                                        
a290743c1e84_myapp-mailhog    MailHog                          Up           0.0.0.0:1025->1025/tcp,:::1025->1025/tcp,                                        
                                                                            0.0.0.0:8025->8025/tcp,:::8025->8025/tcp                                         
myapp-nginx                   /docker-entrypoint.sh ngin ...   Restarting                                                                                    
myapp-phpmyadmin              /docker-entrypoint.sh apac ...   Up           0.0.0.0:8082->80/tcp,:::8082->80/tcp                                             
myapp-wordpress               docker-php-entrypoint php-fpm    Up           9000/tcp 
$ docker-compose logs nginx
myapp-nginx   | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
myapp-nginx   | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
myapp-nginx   | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
myapp-nginx   | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
myapp-nginx   | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
myapp-nginx   | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
myapp-nginx   | 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.conf to /etc/nginx/conf.d/default.conf
myapp-nginx   | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
myapp-nginx   | /docker-entrypoint.sh: Configuration complete; ready for start up
myapp-nginx   | 2021/07/25 06:06:04 [emerg] 1#1: cannot load certificate "/etc/certs/"myapp.local".pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/certs/"myapp.local".pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
myapp-nginx   | nginx: [emerg] cannot load certificate "/etc/certs/"myapp.local".pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/certs/"myapp.local".pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)

Please help me. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions