Syntax error on line 46

Keywords: WordPress Multisite - Linux - Technical issue - Secure Connections (SSL/HTTPS)
bnsupport ID: ca550983-9d70-62e5-3c0d-0328450adc32
Worst day to have a down period :frowning:
About halfway through a backup session inside Wordpress (not on server side) everything hanged itself. I logged on to the server and saw that MySQL Database had stopped working so I wanted to start it again. For some reason I clicked (using a GUI) on Stop All so the Apache Web Server also stopped. Then Start All and MySQL Database started but Apache refused.

I got the error Syntax error on line 46 and I kind of understand that it has to do with some linked files and the SSL certificates but I dont know how to solve it. Please advise :slight_smile:

Support ticket Bncert-tool ca550983-9d70-63e5-3c0d-0328450adc32

Wish everyone here a happy easter!

Hello @damodrenator,

I haven’t been able to find the error msg you are referring to, could you please share it here? Apart from that, Apache is throwing some errors regarding missing files:

[Fri Apr 02 18:22:44.966649 2021] [autoindex:error] [pid 4058698] [client] AH01276: Cannot serve directory /opt/wordpressmultisite/apps/wordpress/htdocs/wp-content/themes/fullpane/themify/themify-builder/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive

This may be caused the backup didn’t get to copy some files, could you try restoring the files?

Francisco de Paz

Hi @fdepaz

My apologies for the vague description. The syntax error 46 comes when I press Apache Webserver. The complete error looks like this:

Starting Apache Web Server…
Exit code: 8
apache config test fails, aborting
AH00526: Syntax error on line 46 of /opt/wordpressmultisite/apache2/conf/bitnami/bitnami.conf:
SSLCertificateFile: file ‘/opt/wordpressmultisite/apache2/conf/’ does not exist or is empty

I believe this has something to do with BNCert which just gives me an error. I kind of understand why this problem exists but the file exists. I cant solve it though.

But if you think this cant be fixed I will have to re-do the website from scratch as this was the first full backup :frowning:

Hello @damodrenator,

I think a full backup won’t be necessary. To explain the issue, the crt and key files at /opt/wordpressmultisite/apache2/conf/ are symlinks to the originals files:

lrwxrwxrwx  1 root root     60 Feb 10 23:58 -> /opt/wordpressmultisite/letsencrypt/certificates/
lrwxrwxrwx  1 root root     60 Feb 10 23:58 -> /opt/wordpressmultisite/letsencrypt/certificates/

And it seems the files at letsencrypt/certificates/ are no longer present:

total 8
drwxr-xr-x 2 root root 4096 Apr  2 18:26 .
drwxrwxrwx 5 root root 4096 Feb 10 23:53 ..

You can check it by running:

ls  /opt/wordpressmultisite/letsencrypt/certificates -la

To solve this, you only need to restore the certificates to the letsencrypt/certificates folder or regenerate them if you no longer have them.

Francisco de Paz

Hi @fdepaz

Two things:
I ran the check as you described and got this answer

Then I tried to use the BNCert to generate new SSL and got this

I cant regenerate new SSL which I believe would solve the matter

Hello @damodrenator,

Before generating the new certs try removing the symlinks:

sudo rm /opt/wordpressmultisite/apache2/conf/
sudo rm /opt/wordpressmultisite/apache2/conf/ key

Then run the bncert-tool and continue with the installation. For more information on its configuration, please refer to our Learn About The Bitnami HTTPS Configuration Tool guide.

Francisco de Paz


This sounded very clever so I removed the crt and key file and re-ran bncert-tool. Got these two messages:

First it asked about the installation directory so I typed it in and then, as you can see, it came back with the same error

Hello again
Im getting stressed here, if we cant solve it during this week (Thursday tomorrow already) I would like to explore the idea of having a paid consultant to look into it. Is this something Bitnami does?

Hello @damodrenator,

We are sorry to tell you that we do not provide this kind of service. This Community is for giving support on issues discovered with our application packaging. We try to help our users in this forum but we do not offer any kind of paid support.

As you have removed the .crt and .key files, you need to comment the lines in Apache’s configuration file:

# SSLCertificateFile "/opt/wordpressmultisite/apache2/conf/"
# SSLCertificateKeyFile "/opt/wordpressmultisite/apache2/conf/"

After generating the new certs, uncomment the lines and restart Apache:

sudo /opt/bitnami/ restart Apache

Francisco de Paz


It didnt work out, gives out the same error so Im giving up on this. We will rebuild the site instead. At least we got something to do during the weekend :slight_smile:

Hello @damodrenator,

Does it still give the Syntax error on line 46 error after commenting the lines related to the SSL files? Could you please run our support tool again and share with us the code? The team will review it and try to solve the issue.

Francisco de Paz

Yes it gave the same response Im afraid. Now the server is wiped already so its too late. But thanks for the help, most appreciated!