Let's Encrypt Certificate desconfigured appache2

Keywords: General - AWS - Technical issue - Secure Connections (SSL/HTTPS)

bnsupport ID: 551f8bc0-6cb1-4c2d-2805-e550158f4bca

bndiagnostic output:

? Apache: Found possible issues
? Connectivity: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/general/faq/administration/use-firewall/

bndiagnostic failure reason: I do not know how to perform the changes explained in the documentation

Description:
First of all im very new to web developmnet and working with servers.

My issue appeared when I tried to set a Let’s encrypt certificate. My server.config is missing.
I tried this tutorial https://docs.bitnami.com/aws/how-to/generate-install-lets-encrypt-ssl/

So how can I undo this configuration?

Thank you!

Hi @Algunalien

Thanks for using Bitnami LAMP!

It seems you installed the system’s Apache and that may be the reason why Bitnami’s one doesn’t work. I can see you have this in your list of running processes:

...
www-data 18871  0.0  1.4 197044  7284 ?        S    00:00   0:00 /usr/sbin/apache2 -k start
www-data 18872  0.0  1.1 197012  5812 ?        S    00:00   0:00 /usr/sbin/apache2 -k start
www-data 18873  0.0  1.1 197044  5716 ?        S    00:00   0:00 /usr/sbin/apache2 -k start
www-data 18874  0.0  1.1 197012  5812 ?        S    00:00   0:00 /usr/sbin/apache2 -k start
www-data 18875  0.0  1.5 197256  7528 ?        S    00:00   0:00 /usr/sbin/apache2 -k start
www-data 19270  0.0  1.1 196996  5812 ?        S    00:13   0:00 /usr/sbin/apache2 -k start
...

Please stop it and start the Bitnami’s one by following this other post:

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Hi @jcarmona , thanks for the response!
I tried the post you shared but I encountered this issue (image)…

image

Thank you!

Hi again @Algunalien

It seems that the disable command did not succeed. Could you please try this instead and report back?

sudo systemctl disable apache2
sudo /opt/bitnami/ctlscript.sh start apache

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Hello, I still get the same error!

Thank you!

Hi @Algunalien,

Another option is to uninstall the apache2 package from your server. It will also remove the service, plus saving some disk space.

sudo apt-get remove --purge apache2

Okey, @gongomgra, I unistalled apache2. But the web-ervice works in apache… Do I install apache again?

this is the result…

Thank you!

Hi @Algunalien,

Thanks for your message. I reviewed the bndiagnostic information and I think I know what’s the issue you are facing. In the bndiagsnotic info I see this message in Apache

apache2: Syntax error on line 112 of /opt/bitnami/apache2/conf/httpd.conf: module log_config_module is built-in and can't be loaded

As mentioned by the error message, loading the log_config_module from the external file is not necessary. Can you comment out the line in the httpd.conf file and try to start Apache again? If you continue having issues, please run the bndiagsnotic tool again and share the new code with us

Hi again,

So I tried commenting the line 112 and then running the diagnostic tool, leading to same error in line 120. I tried the same process leading to line 122. I stopped here and uncommneted again those lines.

eaae6f0b-ecf4-022f-03b0-373f663c7d3b

Thank you again!

Hi again @Algunalien

It seems that System Apache was installed again. Have you executed a command like apt-get install apache2 or the like? Please, notice that Bitnami solutions do come with their own instance of the Apache server, so installing another in the system will result in conflicts.

If you are looking for an easy and straightforward solution (and in case you have just started with the instance and do not have changes you would mind losing) would be to delete this instance and create a brand new one.

If that is not possible (or you would rather prefer not), please, follow the steps in this thread again to uninstall it. Then, verify that this process is no longer running by doing:

$ ps aux | grep 'apache2'

No entries should appear when executing that command. Then, test the Bitnami Apache server configuration:

$ /opt/bitnami/apache/bin/apachectl -t

Could you please provide me the output of those commands?

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Hi @jcarmona!

Yeah I did reinstall apache, I see, didn’t know about that configuration.

I followed the steps you mentioned this is the result:

About the instance I may consider it, as this may become a larger issue to solve for its value!

Hi,
I just want to mention I created a new Instance.
Thanks for the help!

Hi,
I just want to mention I created a new Instance.
Thanks for the help!

Thanks for the update :slightly_smiling_face:

Have you experienced any issues in the new instance this time?

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart: