valet-plus
valet-plus copied to clipboard
Bug: Missing certificate errors are not logged in `~/.valet/Log/nginx-error.log`
- [x] I've checked the issue queue and could not find anything similar to my bug.
- [x] I'm on the latest version of valet-plus (
valet --version
):2.0.0
- [x] I've run
valet fix
andvalet install
after updating and before submitting my issue/feature.
What is the problem?
Some crucial errors like the one below is logged in /usr/local/var/log/nginx/error.log
and not easily found for debugging in ~/.valet/Log/nginx-error.log
.
2020/02/03 09:29:34 [emerg] 74039#0: BIO_new_file("/Users/sander/.valet/Certificates/website.test.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/Users/sander/.valet/Certificates/website.test.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
What was supposed to happen?
Log in ~/.valet/Log/nginx-error.log
so users can find it more easily.
What actually happened? It's logged in a directory that most users don't know about.
How to reproduce this?
- Run
valet secure
in a valet parked subdirectory:~/sites/website$ valet secure
. - (Re-)move the certificate:
rm -f ~/.valet/Certificates/website.test.crt
- Restart nginx:
valet restart nginx
- Open
website.test
in a browser and it throwsERR_CONNECTION_REFUSED
. The error is logged in/usr/local/var/log/nginx/error.log
.
What is the solution? Not sure, might be as simple as changing the nginx logging level?
@SanderAtom I've also determined this behaviour. I think there is something wrong with the nginx.conf valet+ provides. We might want to start looking there.
Found a solution for this yet? valet secure
followed by valet unsecure
results in the same error (without the log though), but for every website.
https://laracasts.com/discuss/channels/general-discussion/the-process-has-been-signaled-with-signal-6
This might be related?