valet-plus icon indicating copy to clipboard operation
valet-plus copied to clipboard

Bug: Missing certificate errors are not logged in `~/.valet/Log/nginx-error.log`

Open SanderAtom opened this issue 4 years ago • 3 comments

  • [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 and valet 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?

  1. Run valet secure in a valet parked subdirectory: ~/sites/website$ valet secure.
  2. (Re-)move the certificate: rm -f ~/.valet/Certificates/website.test.crt
  3. Restart nginx: valet restart nginx
  4. Open website.test in a browser and it throws ERR_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 avatar Feb 10 '20 18:02 SanderAtom

@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.

Neodork avatar Feb 12 '20 13:02 Neodork

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.

mischabraam avatar Jul 05 '20 06:07 mischabraam

https://laracasts.com/discuss/channels/general-discussion/the-process-has-been-signaled-with-signal-6

This might be related?

mischabraam avatar Jul 05 '20 07:07 mischabraam