title: Apache ERR_CONNECTION_REFUSED over SSL on Ubuntu
body: <p>I'm trying to set up an Apache (2.4) server on Ubuntu. For now I'm just trying to get it to serve static pages from <code>/var/www/html</code> (although eventually I want to run a WSGI Python app).</p>
  
  <p>Here's my <code>sites-available/website.conf</code> file:</p>
  
  <pre><code>&lt;VirtualHost *:443&gt;
          ServerAdmin email@gmail.com
          ServerName website.com:443
          SSLEngine on
          SSLCertificateFile /root/website.csr
          SSLCertificateKeyFile /root/website.key
          DocumentRoot /var/www/html
          &lt;Directory /&gt;
                  Options FollowSymLinks
                  AllowOverride None
          &lt;/Directory&gt;
          &lt;Directory /var/www/&gt;
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride None
                  Order allow,deny
                  allow from all
          &lt;/Directory&gt;
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>(Replaced my actual domain with "website".)</p>
  
  <p>When I try to connect to this by either going to my domain name or the server's IP, Chrome gives me <code>ERR_CONNECTION_REFUSED</code> ("This site can’t be reached"). </p>
  
  <p>I also tried with telnet:</p>
  
  <pre><code>root@website:/etc/apache2# telnet localhost 443
  Trying ::1...
  Trying 127.0.0.1...
  telnet: Unable to connect to remote host: Connection refused
  </code></pre>
  
  <p>When I comment out all the lines to do with SSL from my config file, I can connect over telnet, but Chrome gives me <code>ERR_SSL_PROTOCOL_ERROR</code> ("This site can’t provide a secure connection", which I guess makes sense).</p>
  
  <p>Here's also my <code>ports.config</code>, if that helps:</p>
  
  <pre><code>Listen 80
  
  &lt;IfModule ssl_module&gt;
          Listen 443
          NameVirtualHost *:443
  &lt;/IfModule&gt;
  
  &lt;IfModule mod_gnutls.c&gt;
          Listen 443
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>(Yes, the SSL module is enabled.)</p>
  
  <p>And the part of my <code>apache2.conf</code> that I often see referenced in similar questions:</p>
  
  <pre><code>&lt;Directory /&gt;
          Options FollowSymLinks
          AllowOverride None
          Require all denied
  &lt;/Directory&gt;
  
  &lt;Directory /usr/share&gt;
          AllowOverride None
          Require all granted
  &lt;/Directory&gt;
  
  &lt;Directory /var/www/&gt;
          Options Indexes FollowSymLinks
          AllowOverride None
          Require all granted
  &lt;/Directory&gt;
  </code></pre>
  
  <p>This is my first time setting up an Apache server, so I'm guessing I'm messing up something simple here?</p>