Lance's Blog
  • Home
  • Tech
  • Jazz
  • Game
  • Author
Sign in Subscribe

nginx

A collection of 2 posts
nginx

HSTS and Let's Encrypt

https://timkadlec.com/2016/01/hsts-and-lets-encrypt/
28 May 2019 5 min read
nginx Featured

Nginx no-www to www and www to no-www

Redirect non-www to www For Single Domain: server { server_name example.com; return 301 $scheme://www.example.com$request_uri; } For All Domains: server { server_name "~^(?!www\.).*"; return 301 $scheme://www.$host$request_uri; } -------------------------------------------------------------------------------- Redirect www to non-www For Single Domain: server { server_name www.example.com;
07 May 2019
Page 1 of 1
Lance's Blog © 2025
Powered by Ghost