Control Web Panel

WebPanel => CentOS-WebPanel Bugs => Topic started by: Wonder on December 30, 2021, 08:00:52 AM

Title: After update or script update, my conf files of vhosts al revert to default
Post by: Wonder on December 30, 2021, 08:00:52 AM
Since 2 days ago, I have this problem, if execute manually /scripts/update_cwp or simple, wait to anacron execute this, my conf files of my vhosts are revert to default, exact that, If I rebuilt configuration.

This cause to me the lost trafic in 2 nights, because, in my DNS (I use vpn) I have set the ipv6 and in my conf file of vhost I set ipv4 and ipv6 but the dns to my site point to ipv6.

When this update are execute, this files return to stock files and lost all changes, include, my ipv6 add configuration.

A big problem for me because I don't want point to ipv4, I want point to ipv6 like this lasts months...
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Netino on December 31, 2021, 04:15:41 AM
As reported by CWP team, the solutions is just:
Code: [Select]
rm -f /usr/local/cwp/users/suspended/*.bandwidth
/scripts/cwp_api webservers rebuild_all
The first command remove all bandwidth limits from your sites, and the second rebuil all sites configurations of your webservers.

NOTE: 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 are *always* overwritten when CWP is updated too. So, you *must* to create additional files in that directories, instead to change it.

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.

Regards,
Netino
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Wonder on December 31, 2021, 09:55:19 AM
This is something that had never happened until 2 days ago.
First, a CWP update caused a failure in the vhosts (apache, nginx ...) and then, although CPW did not update, at night it always passes the script to check for updates and / or perform the necessary actions.
From then on, my vhost files are restored by default.

As I comment, this had never happened until 2 days ago.

I had modified the vhosts (I use apache) to add my ipv6 as indicated in this thread:
http://forum.centos-webpanel.com/index.php?topic=9935.0


Now it doesn't work, if I run the cwp update script it restores my vhost to default.

The change you mean, I don't know exactly what you mean, is it possible you mean this :?
https://www.mysterydata.com/enable-ipv6-cwp-centos-webpanel/

If so, if there is an update to those template files I will not be knowledgeable and will continue to use my custom template without the new updates / changes coming in.

I am surprised by what happened because of what I said, for months, the vhosts were never restored to default, they always kept the change I made (add my ipv6).

Regards.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Netino on January 01, 2022, 12:29:34 AM
You may have had your sites up and running for months with a custom setup, because in no time did you have to rebuild your sites. When you do that, it changes *all* the site settings in apache, and if you made any changes there, you lose them all.

To avoid this, you should configure additional files in the 'conf.d' directories, either from apache or nginx. So when these changes take place, they won't affect the settings in apache/nginx.

If this is not possible, you should make changes to the apache or nginx templates, and apply the template to the respective site. To change the template, as it will also be overwritten by future changes, you must create new template files in their respective directories, and apply the template to the site configuration under "Webservers Domain Config".
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: drajvat on January 01, 2022, 05:15:18 AM
Same problem here. It was working great until 3 days back and now its reseting all sites to default everyday. I am trying to figure out how templates working but there is no enough information. I created one template and applied it and rebuilt vhosts but still its taking default configuration. I am using nginx, can anyone give clear guideline on this.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: ur07 on January 01, 2022, 11:56:15 AM
As reported by CWP team, the solutions is just:
Code: [Select]
rm -f /usr/local/cwp/users/suspended/*.bandwidth
/scripts/cwp_api webservers rebuild_all
The first command remove all bandwidth limits from your sites, and the second rebuil all sites configurations of your webservers.

NOTE: 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 are *always* overwritten when CWP is updated too. So, you *must* to create additional files in that directories, instead to change it.

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.

Regards,
Netino

We really need clear explanations how to solve this problem permanently. The codes given above are working and the sites are working. But next night it is happening again. So can anyone explain clearly how to solve this for people who are basic level on these issues? Or will be a panel update to fix this problem?

Thanks...
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Wonder on January 01, 2022, 01:02:49 PM
You may have had your sites up and running for months with a custom setup, because in no time did you have to rebuild your sites. When you do that, it changes *all* the site settings in apache, and if you made any changes there, you lose them all.

To avoid this, you should configure additional files in the 'conf.d' directories, either from apache or nginx. So when these changes take place, they won't affect the settings in apache/nginx.

If this is not possible, you should make changes to the apache or nginx templates, and apply the template to the respective site. To change the template, as it will also be overwritten by future changes, you must create new template files in their respective directories, and apply the template to the site configuration under "Webservers Domain Config".

It is correct, during all the time that I have been using CWP I have not had to rebuild the webservers, and yes, I am aware that, when I rebuild, the custom changes disappear, of that I am aware and aware, and as I mentioned, no I had to rebuild once I left everything well configured many months ago.

But .... for 2 or 3 days, rebuild is done automatically when anacron executes the update script, something that did not happen before, and it happens from the problem with the suspended pages ...

Indeed, creating a template, as indicated in the link that I put in my previous post (copy one with another name and customize it as desired) and then rebuild by selecting that new template, will solve the issue that now, all the nights, the automatic rebuild, which there was not before, did not affect my changes.

But what "worries" me is that one day a new change to the templates (in my case apache) will enter and since I am using a custom one, I may not be aware of this possible new change.

Be that as it may, I understand the people who comment on it, this did not happen before, for months, years and so on, now, every day the daily automatic script rebuilds and we lose all the changes made.

Greetings and happy new year.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: tutods on January 01, 2022, 01:45:33 PM
As reported by CWP team, the solutions is just:
Code: [Select]
rm -f /usr/local/cwp/users/suspended/*.bandwidth
/scripts/cwp_api webservers rebuild_all
The first command remove all bandwidth limits from your sites, and the second rebuil all sites configurations of your webservers.

NOTE: 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 are *always* overwritten when CWP is updated too. So, you *must* to create additional files in that directories, instead to change it.

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.

Regards,
Netino

Any way to run this command every hour for example?
Because my websites are blank every day and some times 2 times for day
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: seati on January 01, 2022, 06:14:31 PM
What a pain in the butt!

For some of us who use nginx as default webserver, there's no such thing as .htaccess. Therefore all redirects, rewrites, etc. have to be written to the vhost conf file. Creating a separate template file for EACH website based on their rewrite/redirect needs seems like too much work to do.

So far, the only viable solution that I've found is to keep a backup copy of the vhosts' conf files and created a script that will run periodically to match md5sums and if some file is different, it replaces the current file with the backup and then reloads nginx.

This update was (from my personal point of view) irresponsible, as it has brought too many issues for server administrators. Rebuilding vhosts should be something that server admins could do if needed, but that wouldn't be done by the update cron.

I'm surprised that no one from CWP has jumped in to explain if this will be a permanent "feature" (not to say a BUG).
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: writerguyfl on January 01, 2022, 08:44:23 PM
This update was (from my personal point of view) irresponsible, as it has brought too many issues for server administrators. Rebuilding vhosts should be something that server admins could do if needed, but that wouldn't be done by the update cron.

I'm surprised that no one from CWP has jumped in to explain if this will be a permanent "feature" (not to say a BUG).

Amen to this.  I've been using CWP Pro for years.  Updates have never completely broken all websites before.

This is a massive bug or a fundamental change in the way the Control Panel is updated.  Either way, the lack of an official statement is troubling...particularly for those of us who pay for the product.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Netino on January 01, 2022, 09:45:00 PM
(...)
But what "worries" me is that one day a new change to the templates (in my case apache) will enter and since I am using a custom one, I may not be aware of this possible new change.

Be that as it may, I understand the people who comment on it, this did not happen before, for months, years and so on, now, every day the daily automatic script rebuilds and we lose all the changes made.

If you apply the template to any domain in "Webservers Conf Domain", the future changes in templates will not affect your customization.

Quote
Greetings and happy new year.

Regards, and happy new year!
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Netino on January 01, 2022, 09:56:22 PM
Any way to run this command every hour for example?
Because my websites are blank every day and some times 2 times for day

Surely.
But the problem is supposed to be solved, with that command, after 'update_cwp' command.
So, must be issued three commands, as root user:
Code: [Select]
# /scripts/update_cwp
# rm -f /usr/local/cwp/users/suspended/*.bandwidth
# /scripts/cwp_api webservers rebuild_all

The new and updated version of CWP is supposed to solve the problem.
If you have problems in the execution of these commands, may be you need to update Ioncube loader:
Code: [Select]
# /scripts/update_ioncube

To put the commands after daily update, you can add he commands to the file '/etc/cron.daily/cwp'.
To run hourly, put the cwp file above in '/etc/cron.hourly/'.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Netino on January 01, 2022, 10:06:17 PM
What a pain in the butt!

For some of us who use nginx as default webserver, there's no such thing as .htaccess. Therefore all redirects, rewrites, etc. have to be written to the vhost conf file. Creating a separate template file for EACH website based on their rewrite/redirect needs seems like too much work to do.

So far, the only viable solution that I've found is to keep a backup copy of the vhosts' conf files and created a script that will run periodically to match md5sums and if some file is different, it replaces the current file with the backup and then reloads nginx.

You can use the following command to freeze the any regular file, preventing any changes in it:
Code: [Select]
# chattr +i /path/to/file
Use it in a controlled way, knowing when to remove the immutability of the file, for example, when you need to change it.

When you want to change that file, just issue the command:
Code: [Select]
# chattr +e /path/to/file
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Wonder on January 01, 2022, 11:49:41 PM

If you apply the template to any domain in "Webservers Conf Domain", the future changes in templates will not affect your customization.
Yes, at this moment I have it like this, so I have had to do so as not to lose my custom configurations (such as ipv6) but I fully agree with what colleagues have commented in previous posts.

Regards!
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: seati on January 02, 2022, 01:20:39 AM
What a pain in the butt!

For some of us who use nginx as default webserver, there's no such thing as .htaccess. Therefore all redirects, rewrites, etc. have to be written to the vhost conf file. Creating a separate template file for EACH website based on their rewrite/redirect needs seems like too much work to do.

So far, the only viable solution that I've found is to keep a backup copy of the vhosts' conf files and created a script that will run periodically to match md5sums and if some file is different, it replaces the current file with the backup and then reloads nginx.

You can use the following command to freeze the any regular file, preventing any changes in it:
Code: [Select]
# chattr +i /path/to/file
Use it in a controlled way, knowing when to remove the immutability of the file, for example, when you need to change it.

When you want to change that file, just issue the command:
Code: [Select]
# chattr +e /path/to/file

The right command to be able to edit the file again would be:

Code: [Select]
# chattr -i /path/to/file

The "+e" switch is related to extents...

As to why I went the "script way" is because if something "changes" in the way nginx is set up (like for instance, where the private keys and certs are stored), I always have a "backup file" to compare and diff.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Netino on January 02, 2022, 03:01:46 AM
The right command to be able to edit the file again would be:
Code: [Select]
# chattr -i /path/to/file

The "+e" switch is related to extents...

You are right. Sorry for confusion.

Quote
As to why I went the "script way" is because if something "changes" in the way nginx is set up (like for instance, where the private keys and certs are stored), I always have a "backup file" to compare and diff.
Yes, this is the method I use to check diffs. But I do it with a script, because this is a headache and this would be too much more headache to make it manually.
And I assure to you these templates change over time.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Amani on January 02, 2022, 06:34:48 AM
Not sure why the CWP team is quite about this
I'm also having this issue across 6 servers.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: tutods on January 02, 2022, 09:29:46 AM
Any way to run this command every hour for example?
Because my websites are blank every day and some times 2 times for day

Surely.
But the problem is supposed to be solved, with that command, after 'update_cwp' command.
So, must be issued three commands, as root user:
Code: [Select]
# /scripts/update_cwp
# rm -f /usr/local/cwp/users/suspended/*.bandwidth
# /scripts/cwp_api webservers rebuild_all

The new and updated version of CWP is supposed to solve the problem.
If you have problems in the execution of these commands, may be you need to update Ioncube loader:
Code: [Select]
# /scripts/update_ioncube

To put the commands after daily update, you can add he commands to the file '/etc/cron.daily/cwp'.
To run hourly, put the cwp file above in '/etc/cron.hourly/'.

Today already have this issue 4 times.
I can't fix it, already talk with support and the problem remains
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: writerguyfl on January 02, 2022, 01:03:48 PM
Not sure why the CWP team is quite about this
I'm also having this issue across 6 servers.

It's insane, isn't it?  Having to be awake in the middle of the night...every night...to manually unsuspend all of my servers because of a bug or a change in the way CWP updates is asinine.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: studio4host on January 02, 2022, 02:41:57 PM
you need to use make all configurations in custom vhost templates...info about this is on cwp wiki.
Manual changes in the path or anything else in the vhost files are BAD and you should never do it.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: seati on January 02, 2022, 05:11:39 PM
you need to use make all configurations in custom vhost templates...info about this is on cwp wiki.
Manual changes in the path or anything else in the vhost files are BAD and you should never do it.

A template is supposed to be something that you can use several times and that just gets the "custom" info replaced... or at least, that's what I understand for "template". When you have to create a "template" for each and every single site that uses a custom rewrite, redirect, directive, etc. then it's a custom config, not a template.

The RIGHT way for it to work (hope CWP staff reads this) is to:

1. Have a templates section as it is right now.
2. Have a CUSTOM CONFIG section for each website.
3. Have the vhosts "builder" load the template, replace the "regular" info, check if there's  a custom config for this website and if there is, then include such config in the vhost config file.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: drajvat on January 03, 2022, 04:19:22 AM
Guys, i resolved this by setting custom configuration. this might help someone.

1. Create Template by going into > WebServers Template Editor > Create file > select Template type vhost > type any name for file > paste your custom file code

2. Go to WebServers Domain Conf > select domain or subdomain > Create configuration > Select nginx -> proxy > Select custom file you created in "Nginx default vhost template"

3. Add custom port or simply add 80

4. Save it and restart nginx

Please note, i am using only nginx.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Netino on January 03, 2022, 11:27:31 PM
(...)
A template is supposed to be something that you can use several times and that just gets the "custom" info replaced... or at least, that's what I understand for "template". When you have to create a "template" for each and every single site that uses a custom rewrite, redirect, directive, etc. then it's a custom config, not a template.

The RIGHT way for it to work (hope CWP staff reads this) is to:

1. Have a templates section as it is right now.
2. Have a CUSTOM CONFIG section for each website.
3. Have the vhosts "builder" load the template, replace the "regular" info, check if there's  a custom config for this website and if there is, then include such config in the vhost config file.

I have customizations in '/usr/local/apache/conf.d', for example, and all of them was preserved with the rebuild of the webservers, without any templates.
But you can do it too in nginx, if needed.
It depends of your preferences.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: jmoyano on January 05, 2022, 10:36:01 AM
Hello everyone,

I'm following all the threads reporting this issue (vhosts overwritten with default values, page suspended) since Dec 30. For my server, the overwritting happens at 3:00 am, so fifteen minutes later, a cron job restore vhosts/ from backup and reload apache to recover the websites.
However, I was specting a better/more formal solution, maybe a patch, coming from the CWP team. All the solutions proposed in the forum are hacks, not real solutions. If I'm missing something, the proper solution, can anyone please point me what's the correct fix for this problem?

Thanks in advance :-)
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Netino on January 06, 2022, 12:41:33 AM
Hello everyone,

I'm following all the threads reporting this issue (vhosts overwritten with default values, page suspended) since Dec 30. For my server, the overwritting happens at 3:00 am, so fifteen minutes later, a cron job restore vhosts/ from backup and reload apache to recover the websites.
However, I was specting a better/more formal solution, maybe a patch, coming from the CWP team. All the solutions proposed in the forum are hacks, not real solutions. If I'm missing something, the proper solution, can anyone please point me what's the correct fix for this problem?

Thanks in advance :-)

The CWP dashboard now rebuilds all sites daily.
This means that if you have any previous customizations, you cannot do them directly in the Apache server configuration files.
You must create the customizations only in cloned template files for this purpose.
You did it?
What types of customization have you done?
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: seati on January 07, 2022, 06:48:37 AM
The CWP dashboard now rebuilds all sites daily.
This means that if you have any previous customizations, you cannot do them directly in the Apache server configuration files.
You must create the customizations only in cloned template files for this purpose.
You did it?
What types of customization have you done?

Did you read all previous posts? A template shouldn't be something that needs to be created for each website, the definition of "template" in computing is:

a preset format for a document or file, used so that the format does not have to be recreated each time it is used.

So if we need to create a "template" for each website, then it's not a template, but a custom config.

There might be a thousand ways to go around this BUG, but the main purpose of this (and any) community forum is to get feedback so you can create a better product.

My scripting solution works for me, I can go to bed right now knowing that the websites will be up and running 24/7 (I even added a custom check that runs every minute, so the longest the websites can remain offline is 59 seconds)... But it's a hack, it's not a real solution.

 I even created a crack for CWP that could allow me to use Pro features without a Pro license (never released it and I am paying for my pro licenses), so the fact that something "can be done" doesn't mean that it "should be done"... or at least, that by doing things a specific way doesn't imply that it's the right way to do them.

Again, my hack works... but I have mixed feelings about having to do some custom coding to go around a bug that wasn't there... if CWP had rebuilt vhosts from the beginning, then it would be my choice to do some custom coding, go the "cwp way" or install another panel. But the fact that this "feature" (a.k.a. "bug") appeared out of nowhere with the last update and without any previous notice is what troubles me.

Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: zfrost on January 07, 2022, 10:12:03 AM
I agree, this whole situation cannot be happening.

At the momment I got 2 servers with 6 frontends and 14 backends.. the template "solution" is just a temp workaround to a problem introduced with no notice whatsoever but I'm not willing to make a template for each of the projects on my server. That defeats the whole purpose of a template.
Making modifications to vhosts is a pretty common practice. Even CWP "allowed" it for years.

We know it's gonna be reset whenever apache is rebuilt, but first, apache shouldn´t be rebuilt by an update or at least not without a big ass notice prior to the update and second we as admins have the meanings to restore them whenever we manually rebuild it.

For now, I'm just restoring my vhosts everyday in hopes that they fix this bug, but things like this makes me consider dropping CWP for anything else more reliable and transparent. I understand you need to make money with the paid support, but staying radio silent won´t do any good.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: jmoyano on January 07, 2022, 10:23:46 AM
The CWP dashboard now rebuilds all sites daily.
This means that if you have any previous customizations, you cannot do them directly in the Apache server configuration files.
You must create the customizations only in cloned template files for this purpose.
You did it?
What types of customization have you done?

Hello Netino,

Sorry the delay. I'm not the one who add domains to CWP, and I don't know exactly whats the procedure that my partners follow. I tried yesterday to edit a domain using the "select template" method, and it seems that the nightly rebuild keep the changes and the site is still working.

To summarize (please, correct me if I misunderstand): I have to create a template for every site that has a configuration detail. For example, if I don't want to have webmail support for a site, I have to create a template for that. If a site should not have "AllowOverride All", it is necessary to create a template for that. And so on. Like seati pointed before, it is necessary to have a template for every difference that a site has with another site in the same server. Right? So when CWP does the automatic vhosts rebuild, the sites keep up and running.

I have hundreds of domains in the server. It will be a lot of work and testing to create a template for each one. Is there any workaround? Can this rebuild process be stopped or masked somehow? Is it possible to protect the configurations until we move to the "template" method?

Thank you for your help.

Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: jmoyano on January 07, 2022, 12:36:22 PM
I have extra information that forgot to add.

In the CWP installation that we use, when a new domain is added, it uses a default configuration for webserver in vhosts. That default configuration leaves the new domain working without issues. At night, that same configuration is overriden by the "rebuild vhosts" script, using the "suspended" template. I'm not sure, but it looks like there is a bug somewhere. If a website is added through CWP, and this website is running when finished, it shouldn't be disabled when this "vhosts rebuild" takes place at night.

Thanks for your help.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Netino on January 09, 2022, 03:19:21 AM
(...)
Did you read all previous posts? A template shouldn't be something that needs to be created for each website, the definition of "template" in computing is:
a preset format for a document or file, used so that the format does not have to be recreated each time it is used.
So if we need to create a "template" for each website, then it's not a template, but a custom config.

But you don't have to create a new template for each site!
You can create just one template for all other sites.
So you set and use the same template for that customized sites.
You only need to create a new template just when you have a new type of customization. For a new site, or new group of sites.

Quote
(...)
Again, my hack works... but I have mixed feelings about having to do some custom coding to go around a bug that wasn't there... if CWP had rebuilt vhosts from the beginning, then it would be my choice to do some custom coding, go the "cwp way" or install another panel. But the fact that this "feature" (a.k.a. "bug") appeared out of nowhere with the last update and without any previous notice is what troubles me.

I don't know what bug are you mentioning, but the templates are a feature for the panel.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Netino on January 09, 2022, 03:29:45 AM
(...)
Hello Netino,

Sorry the delay. I'm not the one who add domains to CWP, and I don't know exactly whats the procedure that my partners follow. I tried yesterday to edit a domain using the "select template" method, and it seems that the nightly rebuild keep the changes and the site is still working.

To summarize (please, correct me if I misunderstand): I have to create a template for every site that has a configuration detail. For example, if I don't want to have webmail support for a site, I have to create a template for that. If a site should not have "AllowOverride All", it is necessary to create a template for that. And so on. Like seati pointed before, it is necessary to have a template for every difference that a site has with another site in the same server. Right?
(...)

Yes, you are right.
Any new customization needs a new template.
But the same single template can be applied to a group of sites.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: seati on January 09, 2022, 03:35:16 AM

But you don't have to create a new template for each site!
You can create just one template for all other sites.
So you set and use the same template for that customized sites.
You only need to create a new template just when you have a new type of customization. For a new site, or new group of sites.

I don't know what bug are you mentioning, but the templates are a feature for the panel.

Again, a template should be "re-usable". Have you every used nginx? In nginx there's no such thing as a .htaccess file! All redirects, rewrites, etc. need to be in the .conf file!
We host lots of websites with custom redirects, or custom rewrites! Thinking that WordPress is a "standard" or that all websites should expose URLs is a mistake!

A web based control panel should assist server admins to execute some tasks easier and in a more friendly way, but shouldn't imply that all server admins are dumb users who can't log into a shell and run commands or modify files! If I wanted a "fool proof" system where everything is just "point and click" I would get a Windows server and not a Linux one!

Yes, the fact that it "needs" to overwrite all configs every single day and doesn't perform any previous checks and imposes this as a "rule of thumb" is a BUG, not a feature.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: Starburst on January 09, 2022, 05:40:15 AM
They need to reverse this change that started in 0.9.8.1114.

We run several IPv6 sites, and having a dedicated template for both non-SSL and SSL if not feasible.

What CWP needs to do like other control panels, is implement IPv6 support so this problems will not arise.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: drajvat on January 10, 2022, 07:48:38 AM
I already have template for domain and when i click on rebuild vhost on save, it just create vhost with default file. It's not taking that custom template. Even i tested it with default code with miner changes, and it won't take it while rebuilding vhost.
Title: Re: After update or script update, my conf files of vhosts al revert to default
Post by: jmoyano on January 27, 2022, 12:39:32 PM
Since this "feature" was released, I have been migrating, one by one, all the domains and subdomains in my server to the recommended "template configuration". It seemed to work. Until today  :'(. I found all the sites suspended again. No matter which template the site has, all of them suspended. Every site has a template matching its configuration. The template is correct. CWP shows the domain with its associated template. Nevertheless, all domains and subdomains are "suspended", no matter what. It looks as what drajvat is reporting.

The real solution is to stop this "feature". It is not reliable. As a software development concept, as a system behavior, it is horrible. This is pure speculation, but it looks like a hack that hides other issues. Maybe design problems too deep for the CWP team to solve without big efforts and time. I only see this kind of solutions as a "give me time to fix it" strategy. However, it is taking too long.

If there is no way for CWP to stop the "vhosts rebuild" process, I can only do some scripting to save new domains and restore periodically. I don't want to do this. It is a workaround to handle a not working hack. The best solution is to remove or disable the hack.

What can I do? What other users of CWP did?

Thank you for your help.