Problem to configure static website with Apache

Problem Description
I’m trying to set up a static website on my Freedombox not by going the user-based way, but by leveraging a custom Apache config file with a domain name (let’s call it that’s not the one used for Plinth (let’s call it

I also got a SSL certificate via Let’s Encrypt, so I’m all good here.

Here’s my config at /etc/apache2/sites-available/ (I used 01 as a prefix to prioritize it over the freedombox config files).

<IfModule mod_ssl.c>
<VirtualHost *:443>

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/custom
        DirectoryIndex index.html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

SSLCertificateFile /etc/letsencrypt/live/
SSLCertificateKeyFile /etc/letsencrypt/live/
Include /etc/letsencrypt/options-ssl-apache.conf


  • I place index.html in /var/www/html/custom.
  • I create the symlink in /etc/apache2/sites-enabled and reload Apache.

Expected Results

I should see the content of that index.html at

Actual results

When trying to reach my website at, I get redirected to - even though this is not the domain name I use for that effect - and my Freedombox home page shows up.

What’s the Apache directive I need to add so that shows the content of /var/www/html/custom/index.html?

Interestingly, when going to, it shows correctly the content of /var/www/html/custom/category/index.html.


If I choose to go the user-based way, is it possible to have to show the content of I tried to play with a CNAME DNS record, but without success.

1 Like

Hi @etienne

Previously, I totally misunderstood your question. Apologies; I removed my (misunderstood) answer.

Here’s how I tweaked your configuration to get it working:

  • Achieve the certificate (you already have)
  • If need be, create a new folder for your domains website as described here.
  • Remove the <IfModule> arguments along with Include /etc/letsencrytp/options-ssl-apache.conf to revise your conf file as needed in regard to below
<VirtualHost *:443>
    DocumentRoot /var/www/

    <Directory /var/www/>
        Options -Indexes +FollowSymLinks
        AllowOverride All

    ErrorLog ${APACHE_LOG_DIR}/
    CustomLog ${APACHE_LOG_DIR}/ combined

SSLCertificateFile /etc/letsencrypt/live/
SSLCertificateKeyFile /etc/letsencrypt/live/

  • Generate symbolic link with a2ensite
  • Restart your apache server with sudo systemctl reload apache2

I got this successfully working. Fingers crossed for now.

Take care.

Thank you very much @Ged296123 for your help and for being thorough as well.
I got the static website working, thanks to you! Your previous answer was also correct.

The thing that I can’t seem to go away is this redirection: when I go to, it redirects to I’ve been searching how to get rid off this index.html bit that pops up automatically in the URL bar, but no success. I think it’s not a big deal anyway.

Thanks again for your help!