Author Topic: why my cwp is rebuilding all my vhost conf by itself ?  (Read 2225 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
why my cwp is rebuilding all my vhost conf by itself ?
« on: January 01, 2022, 10:46:36 PM »
I have several vhost configured, but the server restarts the configurations by itself, where I lose everything configured. Any idea of this behavior? Thanks!!

Offline
***
Re: why my cwp is rebuilding all my vhost conf by itself ?
« Reply #1 on: January 02, 2022, 03:20:16 AM »
You must avoid to change directly the vhosts/*.conf files.
They will always overwritten always the webservers must be rebuilt.
In a recent update of CWP was needed to rebuild the webservers.
Instead of to change directly the vhosts conf files, you must create additional custom templates, simply copying and change them.
After that, you must apply the customized template to you site in CWP, "WebServers Domain Conf".

If you customize your webserver configuration, you *must* customize too the webserver templates in "/usr/local/cwpsrv/htdocs/resources/conf/web_servers/", otherwise, they will always be overwritten when CWP is updated.
(check there your webservers files used)

The templates per-si are *always* overwritten when CWP is updated too. So, you *must* to create additional files in that directories, instead to change it.
Copy an existant file, change the name of the file, one for .conf and another for .ssl.conf (always two files, obligatorily). This is needed to the template is showed in the "WebServers Domain Conf".

One way to avoid this customization above (in webserver templates) is to create your custom files directly in 'conf.d' diretories of your webservers, avoiding to change the system config webserver files. You can use it, if possible.

The triggers are the rebuild of the WebServers.
The update routine in /etc/cron.daily/cwp file now is rebuilding the Webservers daily.

Regards,
Netino