3

I am trying to set up SSH for my apache2 server. Apache seems to find my private key, because it complains once I move it. But it doesn't check the content of the file: When I replace it with gibberish, it will still give me a nice startup

ks@survey:/etc/apache2/ssl.key$ sudo service apache2 restart
[ ok ] Restarting web server: apache2 ... waiting .

Shouldn't it be checking the content of the key file and asking me for my password? Here is what my error.log says:

[Wed Jul 23 22:21:55 2014] [notice] caught SIGTERM, shutting down
[Wed Jul 23 22:21:56 2014] [notice] Apache/2.2.22 (Debian) mod_ssl/2.2.22 OpenSSL/1.0.1e mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations

(My version of openssl is supposed to be patched and free of heartbleed.)

Apachectl gives the following output:

ks@survey:/etc/init.d$ sudo  /usr/sbin/apachectl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443          survey.zqa.tu-dresden.de (/etc/apache2/sites-enabled/workload-ssl:2)
*:80                   is a NameVirtualHost
         default server survey.zqa.tu-dresden.de (/etc/apache2/sites-enabled/workload:1)
         port 80 namevhost survey.zqa.tu-dresden.de (/etc/apache2/sites-enabled/workload:1)
Syntax OK
9
  • 1
    What's your configuration look like? What problems are there with the SSL listener when you try to use it? Jul 23, 2014 at 21:03
  • @ShaneMadden Here is my configuration: pastebin.com/LH2rGMH8 Jul 24, 2014 at 15:46
  • 1
    I mean the config file that contains the SSL virtual host. By "using" the SSL listener, I mean, trying to connect to it in a browser.. if it's failing to load configured SSL keys, it should be erroring, so what it's doing with port 443 (listening or not, with an SSL key or not) is potentially relevant. Also, can you edit your question to add the output of apachectl -S? Jul 24, 2014 at 16:47
  • 1
    What method did you use to install Apache? The file in init.d should show the path to the httpd binary; once you have that, run /path/to/bin/httpd -S. Also, verify that the key and cert match - compare the modulus from the output of openssl x509 -noout -text -in /etc/apache2/ssl.crt/cert-6728091434395901.pem and openssl rsa -noout -text -in /etc/apache2/ssl.key/server-key.pem. Jul 24, 2014 at 17:12
  • 1
    /usr/sbin/apache2. Are you logged in as root? apachectl is likely at /usr/sbin/apachectl. Jul 24, 2014 at 17:22

2 Answers 2

2

So the file /etc/apache2/sites-enabled/workload-ssl on line 2 is the config you pastebinned, right?

Add SSLEngine On to the <VirtualHost> block there.

2
0

Have you enabled the ssl in the apache modules? If not, you have to execute:

a2enmod ssl

Then if the ssl site is not enabled, you have to execute:

a2ensite default-ssl

You also have to modify the ports.conf.

2
  • I have manually linked my ssl configuration file in sites-available and adding a typo there induces an appropriate error message, so I assume this is being checked. If I do this I don't need to call a2enmod, correct? Jul 24, 2014 at 15:36
  • My ports.conf looks like this pastebin.com/dvZwipkM and here is a link to my system configuration overview pastebin.com/LH2rGMH8 Jul 24, 2014 at 15:48

You must log in to answer this question.

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