Apache 2 and SSL certificates

Hello,

First thanks a lot for the great job :slight_smile:

Since the last update I regularly get (~ every 2-3 days) my ssl apache configuration files in conf/web/domain/apache2.ssl.conf overriden by the defaults ones.

I work with subfolders so it forces me to always edit those files to change the path and the email address. This is a hassle when you have a lot of websites, plus, it let the websites unavailable until it’s fixed every time …

Before the update it used to do that only when the ssl certificates were renewed (every 3 months).

How could we fix that? Is there an easy way to tell apache not to rebuild the config files on certificate generation? I was thinking about implementing a custom cron job to do the job for me but honestly I’m really not into bash scripts and never took the time to dig into it.

Any help is appreciated.

Thanks

Hi @Aporie

The fix is easy: Don’t touch this files :smiley:. If you want to make adjustments, please copy the template to a own one and tweak it there: New Template model or how do i specify php memory limit for each hosting seperately

Awesome! Thanks

Should have asked this question before it would have saved me time :smiley:

Is there a way to make custom template for specific website? 90% of my websites are in the same subfolder name but I do have some which are not.

[EDIT] I just understood you can actually choose the template in the web domain. So you can just create as many specific templates as website structures you need.

Yes, exactly, you can create unlimited templates, as much as you need (for free :smiley:).

Hello. After this operation (from log) “added php-fpm backend configuration” in /home/ullo/conf/web/…/apache2.conf in the DocumentRoot line the previously added value of the subfolder disappeared and the value became like this
as was the default /home/ullo/web/…/public_html. I found an advice that says that you need to add a template to the domain in which to register an additional folder in the DocumentRoot Apache 2 and SSL certificates I created a template /usr/local/hestia/data/templates/web/apache2/php-fpm.build_folder.tpl But when defining it in the settings
domain while saving the “error 3” settings
https://prnt.sc/ty9q9e
What could be the problem with the “error 3” error when adding a template to a domain? There may be other ways to disable overwriting of the /home/ullo/conf/web/…/apache2.conf file so that added subfolder value in DocumentRoot line not missing?

For a custom docroot this should work fine

DocumentRoot %sdocroot%/_build/html/

For Non SSL it is technically the same except with out the ssl drama

1 Like