我正在努力学习Docker和运行Wordpress (苹果硅)。
我找到了这个教程
https://dev.to/aschmelyun/build-a-solid-wordpress-dev-environment-with-docker-448j
在设置所有内容并尝试启动本地服务器WP出口和NGINX出口之后,以下是错误
nginx退出时代码1 wp与代码0一起退出
wp没有其他错误,但nginx有此错误,似乎是SSL错误。
nginx | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
nginx | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx | 2021/05/08 17:05:32 [emerg] 1#1: cannot load certificate "/etc/nginx/certs/self-signed/wordpress-docker.test.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/nginx/certs/self-signed/wordpress-docker.test.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx | nginx: [emerg] cannot load certificate "/etc/nginx/certs/self-signed/wordpress-docker.test.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/nginx/certs/self-signed/wordpress-docker.test.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx exited with code 1发布于 2022-01-01 06:12:24
查看停靠根目录下nginx/certs目录中的自述文件。
您需要在那里放置一个名为"wordpress-docker.test.pem“的证书。
然后是nginx.dockerfile的这一行:
ADD ./nginx/certs /etc/nginx/certs/self-signed将其添加到容器中的nginx目录中。
(就像我现在看到的那样,这是遥远的:“码头-组成-构建站点”命令不再有‘文件找不到’的错误。)
https://stackoverflow.com/questions/67450195
复制相似问题