Update letsencrypt script breaks the server configuration.

Debian/Ubuntu related topics
discripter
Posts: 3
Joined: Mon Jun 19, 2017 9:08 am

Update letsencrypt script breaks the server configuration.

Postby discripter » Mon Jun 19, 2017 9:20 am

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?

ScIT
Posts: 235
Joined: Mon Feb 23, 2015 4:13 pm

Re: Update letsencrypt script breaks the server configuration.

Postby ScIT » Fri Jun 23, 2017 8:48 am

Try to rebuild your user (v-rebuild-user) normaly, this can happen when the user configs are not up to date.

discripter
Posts: 3
Joined: Mon Jun 19, 2017 9:08 am

Re: Update letsencrypt script breaks the server configuration.

Postby discripter » Mon Jul 03, 2017 7:55 pm

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.

ScIT
Posts: 235
Joined: Mon Feb 23, 2015 4:13 pm

Re: Update letsencrypt script breaks the server configuration.

Postby ScIT » Tue Jul 04, 2017 6:54 am

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.

discripter
Posts: 3
Joined: Mon Jun 19, 2017 9:08 am

Re: Update letsencrypt script breaks the server configuration.

Postby discripter » Wed Jul 12, 2017 10:16 am

ScIT wrote: If you need other functions, create a own template inside of the vestacp web template dir.



How can I do this?

demlasjr
Posts: 68
Joined: Thu Feb 27, 2014 8:50 pm

Re: Update letsencrypt script breaks the server configuration.

Postby demlasjr » Wed Jul 12, 2017 7:27 pm

Go to /usr/local/vesta/data/templates/web/apache2 OR nginx, copy a template and modify it.


Return to “Debian/Ubuntu”



Who is online

Users browsing this forum: No registered users and 1 guest