title: SSL not working in Wildfly
body: <p>I checked Wildfly docs and also other sources, but I just can't get SSL to work in Wildfly.</p>
  
  <p>I exported my keystore file:</p>
  
  <pre><code>openssl pkcs12 -export -out output_cert.pfx -inkey domain.key -in domain.crt -certfile ../ca.crt
  keytool -v -importkeystore -srckeystore output_cert.pfx  -srcstoretype PKCS12 -destkeystore output_store.jks -deststoretype JKS
  </code></pre>
  
  <p>I got no errors in the commands above.</p>
  
  <p>Then I configured standalone.xml.</p>
  
  <pre><code>&lt;security-realm name="ssl-realm"&gt;
      &lt;server-identities&gt;
          &lt;ssl&gt;
              &lt;keystore path="SSL/output_store.jks" relative-to="jboss.server.config.dir" keystore-password="mypassword" alias="1" key-password="mypassword"/&gt;
          &lt;/ssl&gt;
      &lt;/server-identities&gt;
  &lt;/security-realm&gt;
  </code></pre>
  
  <p>And I added this to the default-server.</p>
  
  <pre><code>&lt;https-listener name="https" security-realm="ssl-realm" socket-binding="https"/&gt;
  </code></pre>
  
  <p>I started Wildfly, no errors appeared in the log and I found this line:</p>
  
  <pre><code>10:17:58,475 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTPS listener https listening on my_ip:8443
  </code></pre>
  
  <p>Then I deployed an application to the root (/) web context and tried to access it through my_ip:8443, <a href="https://my_ip" rel="nofollow">https://my_ip</a>, my_domain:8443, <a href="https://my_domain" rel="nofollow">https://my_domain</a>.</p>
  
  <p>However I always get a page with the message "The connection was reset". If I change the URL to my_ip:8080, the application can be found through http.</p>
  
  <p>Anyone have any idea what I might be doing wrong?</p>