Passer #nginx en https en deux coups de cuillère à pot
▻https://seenthis.net/blog/index.php?post/2016/07/24/Passer-Nginx-en-https-en-deux-coups-de-cuill%C3%A8re-%C3%A0-pot
Grâce à Let’s Encrypt, la manipulation se fait facilement sous nginx un #raspberry pi2 pour mon cas et archlinux :
En deux trois commandes et en modifiant la configuration nginx :
# pacman -S certbot
# certbot certonly -d lenomdedomaine.fr —rsa-key-size 4096
On adapte nginx :
server listen 80 ; server_name lenomdedomaine.fr ; location ~ /\.well-known/acme-challenge allow all ; location / return 301 ▻https://lenomdedomaine.fr $request_uri ;
server listen 443 ; server_name lenomdedomaine.fr ; root /var/www ; index index.php index.html index.htm ; # On cache les fichiers statiques location ~* \.(html|css|js|png|jpg|jpeg|gif|ico|svg|eot|woff|ttf)$ expires max ; # On interdit les dotfiles (...)