server { listen 80; server_name "scipio.csgalileo.org"; # create this folder empty location /.well-known/acme-challenge { root /var/www; allow all; } location / { return 301 https://$server_name$request_uri; } } server { listen 443 ssl; server_name "scipio.csgalileo.org"; ssl on; proxy_buffering off; location / { proxy_pass http://localhost:8123/; proxy_set_header Host $host; } ssl_certificate /etc/ssl/certs/scipio.csgalileo.org.cer; ssl_certificate_key /etc/ssl/private/scipio.csgalileo.org.key; }