title: Connection refused when using IP but not when using localhost
body: <p>I have deployed my web application in my apache 9 server. I have configured the server following internet guides, and it works fine if I use this link:</p>
  
  <pre><code>http://localhost:8080/ejercicios-programacion/
  </code></pre>
  
  <p>which redirects me to</p>
  
  <pre><code>https://localhost:8443/ejercicios-programacion/
  </code></pre>
  
  <p>However, if I try to do the same but not using localhost but the IP, for example:</p>
  
  <pre><code>http://xx.xxxx.xxxx.xx:8080/ejercicios-programacion/
  </code></pre>
  
  <p>it still redirects me to</p>
  
  <pre><code>https://xx.xxxx.xxx.xx:8443/ejercicios-programacion/
  </code></pre>
  
  <p>but I get a "refused to connect" error.</p>
  
  <p>Up until today it was working perfectly both ways, and the only thing I changed was adding ssl security to my webpage, so it most likely has to do with that. Here are my connectors in servers.xml:</p>
  
  <pre><code>&lt;Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/&gt;
  
  &lt;Connector port="8443" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="C:/cert.pfx" keystorePass="defaultpassword" /&gt;
  </code></pre>
  
  <p>Does anybody know why this is happening?</p>