Nginx - rewrite HTTP to HTTPS

A simple code snippet that can be used to rewrite HTTP request to HTTPS.

server {
	listen 80 default_server;
	return 301 $scheme://;


Nginx Pitfalls - Taxing Rewrites

Milosz Galazka's Picture

About Milosz Galazka

Milosz is a Linux Foundation Certified Engineer working for a successful Polish company as a system administrator and a long time supporter of Free Software Foundation and Debian operating system.