Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[error] open() "/run/nginx/nginx.pid" failed (2: No such file or directory) #52

Closed
gogobody opened this issue Apr 3, 2020 · 1 comment

Comments

@gogobody
Copy link

gogobody commented Apr 3, 2020

在执行sudo make install_ssl遇到如下错误:
docker-compose run web ash -c '/root/.acme.sh/acme.sh --installcert --home /home/app/ssl -d $cert_domain --keypath /home/app/ssl/homeland.key --fullchainpath /home/app/ssl/homeland.crt --reloadcmd "nginx -s reload"' Starting homeland_elasticsearch ... done Starting homeland_postgresql ... done Starting homeland_redis ... done Starting homeland_worker ... done Starting homeland_app ... done Starting homeland_app_backup ... done [Fri Apr 3 10:49:20 UTC 2020] Installing key to:/home/app/ssl/homeland.key [Fri Apr 3 10:49:20 UTC 2020] Installing full chain to:/home/app/ssl/homeland.crt [Fri Apr 3 10:49:20 UTC 2020] Run reload cmd: nginx -s reload nginx: [error] open() "/run/nginx/nginx.pid" failed (2: No such file or directory) [Fri Apr 3 10:49:20 UTC 2020] Reload error for : make: *** [install_ssl] Error 1

@yibum
Copy link

yibum commented Apr 26, 2020

这一步其实已经成功申请并安装完SSL相关的证书,只是在nginx -s reload的时候出错。

只要修改配置https=true并且sudo make restart重启web服务即可,此时nginx相关服务会重新加载配置并启用SSL。

如果要完全修复这个错误,可能要修改Dockerfile,添加RUN mkdir -p /run/nginx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants