Problems in installing ssl cert on apache

I was trying to install origin cert on my server today. Server is Debian 12 with Apache2. Apache config looks like this:

<VirtualHost *:443>

    DocumentRoot "/var/www/"

    <Directory "/var/www/">
            Options MultiViews FollowSymlinks
            AllowOverride All
            Order allow,deny
            Allow from all

    TransferLog /var/log/apache2/example.com_acces.log
    ErrorLog /var/log/apache2/example.com_error.log

    SSLEngine on
    SSLCertificateFile path to cert
    SSLCertificateKeyFile path to priv key
    SSLCertificateChainFile path to chain

I saved the file, restarted Apache and set port forwarding (pic1):
Screenshot (9)

But when I go to my website I can only see (pic2):

What’s more when I type in my browser my internal IP address I can only see Apache default page (pic3):

Can any of you guys help me please?..

With Regards,
Kazimierz Krauze

Here are remaining picture:


and pic3:

You don’t need to use SSLCertificateChainFile. It is legacy setting. You should be including your intermediates in your leaf certificate file now. This means that the file referenced by SSLCertificateFile should contain both the chain and the leaf certificate. If you are using Let’s Encrypt certificates, it will be named fullchain.pem.

When using name based virtual hosts, your client, the web browser in screenshot 3, needs to be sending the site hostname in its request or you receive the default server page.

You need to get your site working properly without Cloudflare before you can expect it to work with Cloudflare.

You are probably need to spend some time on a general Linux webhosting support forum to debug the issues in your setup. I recommend getting familiar with your system log files as they have the details of what is going right and what is wrong. The fine manuals are also something to become intimately familiar with.

Good luck, and be sure to have fun.

Thank you for kind reply. I surely will have!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.