server {
    listen 80;

    root   /usr/share/nginx/html;
    index  index.html index.htm;

    server_name kuadrado-software.fr www.kuadrado-software.fr;
    server_tokens off;

    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

#    location / {
#        return 301 https://$host$request_uri;
#    }
}

server {
    listen 443 ssl;

    root   /usr/share/nginx/html;
    index  index.html index.htm;

    server_name kuadrado-software.fr www.kuadrado-software.fr;
    server_tokens off;

    ssl_certificate /etc/letsencrypt/live/kuadrado-software.fr/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/kuadrado-software.fr/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    location / {
        proxy_pass  http://kuadrado-software.fr;
        proxy_set_header    Host                $http_host;
        proxy_set_header    X-Real-IP           $remote_addr;
        proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
    }
}
