-2

I've got a debian 8 server installed with ispconfig 3, apache2, mysql and php.

And recently I've installed (tried) letsencrypt SSL certificates for my website.com. I did everything as tutorial said, but it just seems that my site has a certificate error...

Here's the tut I used: https://skrilnetz.net/how-to-get-free-ssl-certificates-on-ubuntu/

Then I just added my certificates to:

/etc/apache2/sites-available/website.com.vhost

in

<VirtualHost *:80>
                    DocumentRoot /var/www/clients/client0/web1/web

        ServerName website.com
        ServerAlias www.website.com
        ServerAdmin webmaster@website.com

        **SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/website.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/website.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/website.com/chain.pem**
</VirtualHost>

When doing service apache2 reload -- I get no errors. But certicifates doesn't seem to be working...

Any help is very appreciated! :)

3

You need two configurations. One is for serving (insecure) HTTP on port 80, the second is for serving HTTPS on port 443. Port 443 is the default port browsers will try to access when you try to open a URL starting with https://.

<VirtualHost *:80>
    DocumentRoot /var/www/clients/client0/web1/web

    ServerName website.com
    ServerAlias www.website.com
    ServerAdmin webmaster@website.com
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot /var/www/clients/client0/web1/web

    ServerName website.com
    ServerAlias www.website.com
    ServerAdmin webmaster@website.com

    SSLEngine On
    SSLCertificateFile /etc/letsencrypt/live/website.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/website.com/privkey.pem
</VirtualHost>
| improve this answer | |
  • Thanks! It seems to kind of work... But browser somehow returns: "Forbidden. You don't have permission to access / on this server." Any ideas, why this happens? Thanks! – Ignas Apr 30 '16 at 16:54
  • @Ignas You probably need to allow access to that folder with <Directory> & Require all granted, see here for some examples: askubuntu.com/a/518188/212209 – chrki Apr 30 '16 at 16:57
  • Ohh.. certainly. Somehow missed it. :) Thank you! Everything works excellent now! – Ignas Apr 30 '16 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.