server {
    listen 443 ssl;
    server_name example.com;

    # ssl settings
    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

    ssl_session_cache shared:SSL:1m;
    ssl_session_timeout 5m;

    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;

    # proxy pass to backend
    location /API_KEY {
        proxy_pass http://localhost;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-Ip $remote_addr;
    }
}
