How do I create a SSL redirect?

Solved1.54K views

I want to redirect all HTTP traffic to HTTPS. How do I do that?

Question is closed for new answers.
Selected answer as best

server {
listen [::]:80;
listen 80;
return 301$request_uri;

Selected answer as best
You are viewing 1 out of 1 answers, click here to view all answers.