nginx 🚀
Nginx force SSL

Need to quickly setup ssl and default to that for our sites.

This article made it simple stupid for getting the certs setup.

Then I wrapped up the redirect as seen below

server {
    listen 80;
    listen 443 ssl;
    root /home/someuser/;

    ssl on;
    ssl_certificate /etc/nginx/ssl/nginx.crt;
    ssl_certificate_key /etc/nginx/ssl/nginx.key;
    # Prevent a look
    if ($ssl_protocol = "") {
       rewrite ^   https://$server_name$request_uri? permanent;

    index index.html index.htm index.php;

    charset utf-8;

Thanks to this post as well

Still a mystery but

service nginx restart 

was not working had to do

/etc/init.d/nginx restart

to get the server to reload.