Certs Possible for nginx vhosts?

Is there a way to get a cert for my vhosts on my workstation? I need a cert to get a form to show up (one of their criteria) and I’ve baked my site to not function on ‘localhost’. So I’m stuck.

I’m not sure if I totally understand what you are asking, but could you take a look at https://github.com/FiloSottile/mkcert and see whether it seems like a good fit for your workflow?

I’ve had some success with it for similar ‘need HTTPS on my workstation’ situations.

I work on many websites on my dev box. I name them alpha.local, bravo.local, etc. Because they are named x.local, certbot isn’t working.

Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 2, 8, 12
Obtaining a new certificate
An unexpected error occurred:
The request message was malformed :: Error creating new order :: Name does not end in a public suffix 

Any chance I can get around this?

Yes. Use mkcert. It’s exactly for this scenario. You can even make a *.local certificate to save time, and your browser will be happy with it.

Forget about Let’s Encrypt. You can’t get a Let’s Encrypt-signed certificate for a suffix that isn’t public - like .local.

Ya I tried that. It screwed up just as fast. I will give it another go. Thank you.

Is your browser on a separate machine to your dev box?

If that’s the case, you’ll have to copy the root certificate to your workstation, and trust it manually.

Otherwise, it should work just fine.

Nope. All one box. I forgot what happened before. I find it amazing that devs run into issues like this.

OK just tried a blab.local and it’s giving me mixed results. Chrome says it’s not secure, and upon inspection, it says the mkcert is valid. Truly odd.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.