DEV Community

Cover image for How To Implement Two Way SSL With Nginx

How To Implement Two Way SSL With Nginx

Darshit Patel on June 13, 2020

A couple of weeks ago, I was tasked with figuring out a way to enable two way SSL. I am a programmer, and have had only a limited experience with n...
Collapse
 
agostlg profile image
Luiz Gustavo Oliveira Agostinho •

Hi quality post, thanks for the detailed explanation. I'm In a similar situation that you described in the introduction. Also the references with your opinions about them are quite cool to read. Thanks.

Collapse
 
darshitpp profile image
Darshit Patel •

I'm glad my post could be of help!

Collapse
 
mosababdo profile image
mosababdo •

Yes, you must be glad

Collapse
 
robstokes857 profile image
Robert Stokes •

Very good. I would change the chmod 777 though.

Collapse
 
qainsights profile image
NaveenKumar Namachivayam ⚡ •

I followed the tutorial as-is. I am getting 502 bad gateway. Any insights please?

Collapse
 
darshitpp profile image
Darshit Patel •

I have tried making the tutorial and documented even the smallest steps. Never encountered the 502 error myself, but as a last resort, you can retry all the steps from scratch

Collapse
 
qainsights profile image
NaveenKumar Namachivayam ⚡ •

Thank you. Yes, I did retry thrice in ec2. :(

Thread Thread
 
darshitpp profile image
Darshit Patel •

Can you verify if the EC2 settings are correct? Maybe it is adding something while connecting to the NGNIX service within

Thread Thread
 
qainsights profile image
NaveenKumar Namachivayam ⚡ •

Sure. Did you mean the network rules?

Thread Thread
 
darshitpp profile image
Darshit Patel •

Yes

Collapse
 
inikotoran_38 profile image
Niko F Juliyanto • • Edited

Thanks for sharing this, man. It really helps me. Just one correction on PEM file generation, I think the second line should be

cat ca.crt >> ca.pem

Collapse
 
darshitpp profile image
Darshit Patel •

Thanks for reading! I would never have realized the mistake if you hadn't pointed it out. Thanks a lot!

Collapse
 
mosababdo profile image
mosababdo •

Thanks for this, its very helpful.

Collapse
 
itachiredhair profile image
Akshay Milmile • • Edited

This was a great explanation dude. Thanks for this.

Collapse
 
darshitpp profile image
Darshit Patel •

Glad you liked it!