Author Topic: URGENT !!!! All my vhost conf files of NGINX revert to default  (Read 5163 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
URGENT !!!! All my vhost conf files of NGINX revert to default
« on: January 03, 2022, 08:26:18 AM »
URGENT !!!!
All my vhost conf files of NGINX revert to default.
This huge issue started 31th of december and every night all NGINX conf (ssl as well) files revert to default.
I lost all my customized conf files in all my servers with CentOS 7 and CWP.
Now I have all my servers down.
Please help me to resolve.
Marco

Offline
*
Re: URGENT !!!! All my vhost conf files of NGINX revert to default
« Reply #1 on: January 03, 2022, 12:46:30 PM »
same problem here

Offline
***
Re: URGENT !!!! All my vhost conf files of NGINX revert to default
« Reply #2 on: January 03, 2022, 11:18:40 PM »
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.

You can use this tutorial:
http://wiki.centos-webpanel.com/webservers-vhost-templates

Regards,
Netino

Offline
*
Re: URGENT !!!! All my vhost conf files of NGINX revert to default
« Reply #3 on: January 04, 2022, 07:41:54 AM »
It is not just the CWP update. I had this same problem and found that it's regenerating the vhost files every 24 hours.

In my case, the vhost files were using the wrong IP address because I'd migrated the server last year and the user account had the old IP assigned to it. This meant all my websites went down. Fixed it by directly updating the IP address in the user MySQL database.

Whilst the regenerated vhosts are now as I want them, I really don't want them regenerating every night! Why are CWP messing with this stuff? The vhost config files are designed to be customised and this update is forcing them to be overwritten daily.

Does anyone have any solution to stop this daily regeneration?
 

Offline
*
Re: URGENT !!!! All my vhost conf files of NGINX revert to default
« Reply #4 on: January 05, 2022, 01:23:24 PM »
Just run :
/scripts/update_ioncube

Then run :
/scripts/cwp_api webservers rebuild_all

It may revert one last time is fixed for me after.

User reported in other post that he had to do :
rm -f /usr/local/cwp/users/suspended/*.bandwidth

Offline
*
Re: URGENT !!!! All my vhost conf files of NGINX revert to default
« Reply #5 on: January 05, 2022, 02:22:09 PM »
Just run :
/scripts/update_ioncube

Then run :
/scripts/cwp_api webservers rebuild_all

It may revert one last time is fixed for me after.

User reported in other post that he had to do :
rm -f /usr/local/cwp/users/suspended/*.bandwidth

That might of helped you but it's not helping the majority of people that this is happening to daily. Some of us have tried soooo many things people are posting how to fix it but then the next day, it happens again.

Someones post about update time at least helped me this morning so it happens while I am in front of the computer. I expect to happen again in about 20 minutes.

Offline
***
Re: URGENT !!!! All my vhost conf files of NGINX revert to default
« Reply #6 on: January 06, 2022, 12:33:25 AM »
(...)
That might of helped you but it's not helping the majority of people that this is happening to daily. Some of us have tried soooo many things people are posting how to fix it but then the next day, it happens again.

Someones post about update time at least helped me this morning so it happens while I am in front of the computer. I expect to happen again in about 20 minutes.

Your domains are resolving normally.?
Are delegated to CloudFlare.?

Offline
*
Re: URGENT !!!! All my vhost conf files of NGINX revert to default
« Reply #7 on: January 06, 2022, 03:53:33 PM »
I am experiencing this issue, too. I have a WSGI application that requires a custom vhost file to deploy and this is breaking my website every single night. If there isn't a solution soon I'll have to stop using CWP.

Offline
***
Re: URGENT !!!! All my vhost conf files of NGINX revert to default
« Reply #8 on: January 06, 2022, 09:08:17 PM »
I am experiencing this issue, too. I have a WSGI application that requires a custom vhost file to deploy and this is breaking my website every single night. If there isn't a solution soon I'll have to stop using CWP.

Yes, there is a solution: is you to create a new template file, and set the domain to use it in "WebServers Settings", "WebServers Domain conf".
You did it.?
Did you read this message?: http://forum.centos-webpanel.com/index.php?topic=11650.msg39943#msg39943

Offline
*
Re: URGENT !!!! All my vhost conf files of NGINX revert to default
« Reply #9 on: January 07, 2022, 01:13:36 PM »
I found that using Templates solves the Problem.

Offline
*
Re: URGENT !!!! All my vhost conf files of NGINX revert to default
« Reply #10 on: January 22, 2022, 01:02:21 AM »
I found that using Templates solves the Problem.

Can You please clarify how did You resolve this?

Offline
***
Re: URGENT !!!! All my vhost conf files of NGINX revert to default
« Reply #11 on: January 22, 2022, 01:47:23 PM »
I found that using Templates solves the Problem.

Can You please clarify how did You resolve this?

Here's how. Read and watch the video here: https://wiki.centos-webpanel.com/webservers-vhost-templates