Me too was surprised by the recent change where vhost config files in Apache are overwritten by the cronjob.
This is how I added my own templates, described also by the docs here:
http://wiki.centos-webpanel.com/webservers-vhost-templatesThe vhost config are automatically rebuild with a cron job. (/etc/cron.daily/cwp)
If you need some custom entries in your vhost configs, they now will be deleted/overwritten.
This was a recent change in CWP Pro.
So you need to make custom template configs for your domains:
1. First check what your Webserver configuration ismine is:
Webserver config:[/size] nginx ->apache ->php-fpm2. Create templates filesThe easiest way for me was with terminal/root:
in this directory: (or copy the existing default files)
cd /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/httpd/php-fpm
cp default.stpl default_ci4_public.stpl
cp default.tpl default_ci4_public.stpl
NOTE: the template name for https and http MUST be the same, use only .tpl and .stpl as extension3. Codeigniter edit config template to serve "/public" folder.edit default_ci4_public.stpl and default_ci4_public.tpl and add "/public" to the following:
DocumentRoot %docroot%/publicand
<Directory "%docroot%/public"> 4. Then create a custom config for your Domain add the just created template files to the specific user and domain,
select the just created templates as defaull
From CWP Pro GUI:
WebServers Domain Conf > select username > Custom configHere you should see and choose your custom config templates:
The Apache Configuration
Apache default vhost template type: php-fpm Apache default vhost template: default_ci4_public5. rebuild the Webservers confNow your site should stay online, also after the cron job with CWP pro
In the first image you see the webserver config with the apache default vhost template: default_ci4_public,
which we just made
In this image you see the list with all the templates and also our custom template for codeigniter 4