Roots Discourse

SSL certificates issue after vagrant reload --provision

I did some changes to my ngnix-includes/custom.conf.j2 and did a vagrant reload --provision.
But it ended with an error:

Job for nginx.service failed because the control process exited with error
code.
See "systemctl status nginx.service" and "journalctl -xe" for details

systemctl status nginx.service revealed

nginx: [emerg] cannot load certificate "/etc/nginx/ssl/site.com.cert": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or direc

I checked and the certificate is not in /etc/nginx/ssl/.

vagrant trellis-cert trust also fail saying:

Connection refused - connect(2) for "site.test" port 443

This is my wordpress_sites.yml ssl part:

ssl:
      enabled: true
      provider: self-signed
      hsts_max_age: 0

Can you give me some help?

Following this issue (plus little more suffering for some mistakes) I solved my issue

  • vagrant ssh & sudo rm -r /etc/nginx/ssl
  • removed old cert from the keychain app
  • re-provisioned vagrant SKIP_GALAXY=true ANSIBLE_TAGS=wordpress vagrant reload provision
  • re-trust the certificate vagrant trellis-cert trust