title: Vault Error, Server gave HTTP response to HTTPS client
body: <p>I'm using Hashicorp vault as a secrets store and installed it via apt repository on Ubuntu 20.04.</p>
  <p>After that, I added the root key to access the UI and I'm able to add or delete secrets using UI.</p>
  <p>Whenever I'm trying to add or get a secret using the command line, I get the following error :</p>
  <pre><code>jarvis@saki:~$ vault kv get secret/vault 
  Get &quot;https://127.0.0.1:8200/v1/sys/internal/ui/mounts/secret/vault&quot;: http: server gave HTTP response to HTTPS client
  </code></pre>
  <p>My vault config looks like this :</p>
  <pre><code># Full configuration options can be found at https://www.vaultproject.io/docs/configuration
  
  ui = true
  
  #mlock = true
  #disable_mlock = true
  
  storage &quot;file&quot; {
    path = &quot;/opt/vault/data&quot;
  }
  
  #storage &quot;consul&quot; {
  #  address = &quot;127.0.0.1:8500&quot;
  #  path    = &quot;vault&quot;
  #}
  
  # HTTP listener
  #listener &quot;tcp&quot; {
  #  address = &quot;127.0.0.1:8200&quot;
  #  tls_disable = 1
  #}
  
  # HTTPS listener
  listener &quot;tcp&quot; {
    address       = &quot;0.0.0.0:8200&quot;
    tls_cert_file = &quot;/opt/vault/tls/tls.crt&quot;
    tls_key_file  = &quot;/opt/vault/tls/tls.key&quot;
  }
  
  # Example AWS KMS auto unseal
  #seal &quot;awskms&quot; {
  #  region = &quot;us-east-1&quot;
  #  kms_key_id = &quot;REPLACE-ME&quot;
  #}
  
  # Example HSM auto unseal
  #seal &quot;pkcs11&quot; {
  #  lib            = &quot;/usr/vault/lib/libCryptoki2_64.so&quot;
  #  slot           = &quot;0&quot;
  #  pin            = &quot;AAAA-BBBB-CCCC-DDDD&quot;
  #  key_label      = &quot;vault-hsm-key&quot;
  #  hmac_key_label = &quot;vault-hsm-hmac-key&quot;
  #}
  </code></pre>