0
votes

it is my first import of an signed certificate. Did everything what is mentioned here: http://haraldwingerter.de/?p=267

Now I got the following error:

apache2ctl configtest
AH00526: Syntax error on line 3 of /etc/apache2/sites-enabled/000-default.conf:
ServerName takes one argument, The hostname and port of the server
Action 'configtest' failed.
The Apache error log may have more information.

The log is saying nothing.

/etc/apache2/sites-enabled/000-default.conf

 <VirtualHost *:443>
DocumentRoot /var/www/owncloud
ServerName <servername> (ODER IP-Adresse)
  <IfModule mod_headers.c>
    Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
  </IfModule>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/servername.crt
SSLCertificateKeyFile /etc/ssl/private/servername.key
</VirtualHost>

/etc/apache2/sites-available/default-ssl.conf

 DocumentRoot /var/www/owncloud
 SSLCertificateFile /etc/ssl/certs/servername.crt
 SSLCertificateKeyFile /etc/ssl/private/servername.key

I think I have everything configured right. Where is the issue can“t find it.

Thanks for your help Tommy

1
You have put all the random stuff but where the actual error is coming, you have hidden the values. - Shashwat Kumar

1 Answers

0
votes

Sorry for the missing details!

Now I got rid of this errors but still didnt see the new certificate on the webside.

just changed inside /etc/apache2/sites-available/default-ssl.conf the following lines:

            SSLCertificateFile /etc/ssl/certs/owncloud.crt
            SSLCertificateKeyFile /etc/ssl/certs/owncloud.key
            SSLCertificateChainFile /etc/ssl/certs/DigiCertCA.crt

owncloud.crt > the file I got from digicert

owncloud.key > the key which was generated through csr before

DigiCertaCA.crt > the file I got with the new certificate

It is done like here described https://www.digicert.com/ssl-certificate-installation-apache.htm