I am trying to configure SSL on an old opensuse server:

openSUSE 11.4 (x86_64)
VERSION = 11.4
CODENAME = Celadon

I enabled the apache SSL module:

apache2ctl -M
Loaded Modules:
 core_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 actions_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_host_module (shared)
 authz_groupfile_module (shared)
 authz_default_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 dir_module (shared)
 env_module (shared)
 expires_module (shared)
 include_module (shared)
 log_config_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 setenvif_module (shared)
 ssl_module (shared)
 userdir_module (shared)
 php5_module (shared)
 reqtimeout_module (shared)
 deflate_module (shared)
 headers_module (shared)
 rewrite_module (shared)
Syntax OK

And configured the virtual host providing the SSL certificates (by copying and editing the vhost-ssl.template and renaming it https.xxxxxxxx.conf) and restarted apache.

When I try to connect I get this error:

openssl s_client -connect localhost:443
connect: Connection refused

This is the openssl version installed:

OpenSSL 1.0.1p 9 Jul 2015 (Library: OpenSSL 1.0.0c 2 Dec 2010)

If it can help this is my iptables config:

iptables -L -vn
Chain INPUT (policy ACCEPT 4641 packets, 815K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 1691 packets, 4745K bytes)
 pkts bytes target     prot opt in     out     source               destination   

Can you help me understand why I am not able to connect in localhost to the 443 port?


I believe it is a problem with apache and the additional https.xxxxxxx.conf file:

httpd2 -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
         default server xxxxxxxx.it (/etc/apache2/vhosts.d/xxxxxxxx.conf:3)
         port 80 namevhost xxxxxxxx.it (/etc/apache2/vhosts.d/xxxxxxxx.it.conf:3)
         port 80 namevhost XXX.XXX.XXX.XXX (/etc/apache2/vhosts.d/xxxxxxxx.it.conf:9)

In my listen.conf it seems that if the SSL module is enabled it should Listen 443:

Listen 80

<IfDefine SSL>
    <IfDefine !NOSSL>
        <IfModule mod_ssl.c>

            Listen 443


This is the output of netstat:

netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0  *               LISTEN      8105/mysqld         
tcp        0      0    *               LISTEN      1847/sshd           
tcp        0      0  *               LISTEN      2179/master         
tcp        0      0 :::80                   :::*                    LISTEN      13330/httpd2-prefor 
tcp        0      0 :::21                   :::*                    LISTEN      1930/vsftpd         
tcp        0      0 :::22                   :::*                    LISTEN      1847/sshd           
tcp        0      0 ::1:25                  :::*                    LISTEN      2179/master   

I have modified the /etc/sysconfig/apache2 file to turn on the SSL module


Now it seems to respond correctly bot locally and remotely:

openssl s_client -connect localhost:443
depth=3 C = SE, O = AddTrust AB, OU = AddTrust External TTP Network, CN = AddTrust External CA Root
verify return:1

I still have problems since I get from the browser:

This site can’t be reached
xxxxxxxx.it unexpectedly closed the connection.

Checking the connection
Checking the proxy and the firewall
Running Network Diagnostics

However I believe the problem is not related

  • 1
    Do you have the Listen 443 you'll need? (What does netstat -tulpn on the server list?) May 30, 2018 at 11:05

1 Answer 1


Finally figured it out! Default Apache listen.conf did't have an entry for the ip address assigned to the machinel. Duh. I thought the "listen 80" would cover all ip addresses for the machine.

  • 1
    Listen 80 does cover all the IP addresses for the machine. But it doesn't say anything about port 443 that your question was trying to use. The real issue based on the information in your question was that you didn't have a vhost configured to respond to SSLrequests on port 443 Jun 25, 2021 at 7:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .