A
A
Alexander Konovalov2016-02-18 12:28:09
Apache HTTP Server
Alexander Konovalov, 2016-02-18 12:28:09

Why is the ssl certificate not working?

Hello. I'm trying to install an ssl certificate. I add the following lines to apache2.conf:

<VirtualHost>
DocumentRoot /var/www
ServerName site.ru
SSLEngine On
SSLCertificateFile /etc/ssl/crt/site_ru.crt
SSLCertificateKeyFile /etc/ssl/crt/ssl-cert-snakeoil.key
SSLCertificateChainFile /etc/ssl/crt/site_ru.ca-bundle
SSLSessionCache dbm:/var/cache/httpd/ssl_cache
</VirtualHost>

Restarting apache gives me this error:
Syntax error on line 270 of /etc/apache2/apache2.conf:
<VirtualHost> directive requires additional arguments
Action 'configtest' failed.
The Apache error log may have more information.
 failed!

Where is the mistake?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2016-02-18
@alsopub

IP and port not specified:
or
<VirtualHost *:443>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question