Page 1 of 1

Update letsencrypt script breaks the server configuration.

Posted: Mon Jun 19, 2017 9:20 am
by discripter
After installing letsencrypt certificates on my domains in the Vestapanel, I noticed that that the server periodically breaks down.
I checked the configs:

Code: Select all

/home/admin/conf/web/sapache2.conf
and

Code: Select all

/home/admin/conf/web/snginx.conf 
and they are broken after each start of the script

Code: Select all

/usr/local/vesta/bin/v-update-letsencrypt-desl 
by the cron.

The breakdown of the sapache2.conf is to remove the string

Code: Select all

<VirtualHost 185.25.117. ***: 8443> 
in the configuration of one of the my domains.


The failure of nginx.conf occurs because of the duplication string of one of my domains like:

Code: Select all

server {

server {
How to fix the letsencrypt auto-update script of the vestapanel?

Re: Update letsencrypt script breaks the server configuration.

Posted: Fri Jun 23, 2017 8:48 am
by ScIT
Try to rebuild your user (v-rebuild-user) normaly, this can happen when the user configs are not up to date.

Re: Update letsencrypt script breaks the server configuration.

Posted: Mon Jul 03, 2017 7:55 pm
by discripter
ScIT wrote:Try to rebuild your user (v-rebuild-user) normaly, this can happen when the user configs are not up to date.

Entered into the console.

Code: Select all

v-rebuild-user admin
After that my configs and sites are broken!
I had to restore configurations from backups.

I have some subdomains configured, for example api.mydomain.com on source dir /home/admin/web/mydomain.com/api/ .
And I introduced these changes directly into the configs generated by vestapanel.

Therefore, I think that if Vesta does not know how to do a soft overwrite of my configurations, it's a bad idea to execute the command that you advised.

Re: Update letsencrypt script breaks the server configuration.

Posted: Tue Jul 04, 2017 6:54 am
by ScIT
discripter wrote: After that my configs and sites are broken!
I had to restore configurations from backups.
so it seems that you have a bigger problem with your configuration files. you should be able to run this command without any interrupt on your sites. So maybe check exactly what is incorrect in the configs, also you should not run any website under the admin user, it's better to create a new/own one.

Also a direct change to the config files is in my point of view not good. If you want to add subdomains, just do this within the feature of vestacp (web -> domain aliases). If you need other functions, create a own template inside of the vestacp web template dir.

Re: Update letsencrypt script breaks the server configuration.

Posted: Wed Jul 12, 2017 10:16 am
by discripter
ScIT wrote: If you need other functions, create a own template inside of the vestacp web template dir.

How can I do this?

Re: Update letsencrypt script breaks the server configuration.

Posted: Wed Jul 12, 2017 7:27 pm
by demlasjr
Go to /usr/local/vesta/data/templates/web/apache2 OR nginx, copy a template and modify it.