WebServers vhost templates
* Currently available only for centos 7, version 0.9.8.741+

Important !!!
- Don't edit existing template files as this will be overwritten on the next cwp update.
- Don't edit vhost directly for nginx, varnish, apache as this will be rebuilt with future cwp updates.

Templates location: /usr/local/cwpsrv/htdocs/resources/conf/web_servers/
- Folder main contains main configuration for WebServers
- Folder vhosts contains vhosts configuration for domains (this is what you need)

How to create a template file
The easiest way to do that is to simply copy an existing file and then edit a new file you have created.
Note that you need to have .tpl and .stpl files (tpl is for http and stpl is for https version)

Let's do one example for apache vhost with php-fpm

cd /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/httpd/php-fpm/
cp default.tpl my-template.tpl
cp default.stpl my-template.stpl

Now you can edit these newly created template files.

How to use custom created templates
To use a custom created templates you can simply select them from the admin panel
left menu -> WebServer Settings -> WebServers Main Conf (to use as global server-wide)
left menu -> WebServer Settings -> WebServers Domain Conf (to use for one domain only)

Template folders explained
List from folder: /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/

httpd = apache templates
nginx = nginx templates
varnish = varnish templates
php-fpm = php-fpm service templates (used for all php-fpm versions)

httpd (subfolders explained)
- main folder = default templates used with php-cgi, this is only httpd folder no subfolder
- php-fpm folder = php-fpm templates used when server/domain is running php-fpm
- proxy folder = proxy templates used when apache is used as proxy to other service/port

nginx (subfolders explained)
- main folder = default templates used as proxy templates, this is only nginx folder no subfolder
- php-fpm folder = php-fpm templates used when server/domain is running nginx&php-fpm

varnish (no subfolders)
- main folder = default templates used as proxy templates, varnish has no .stpl (https/ssl) files and also has no other subfolders

php-fpm (no subfolders)
- main folder = default templates used as templates for all php-fpm versions, php-fpm has no .stpl (https/ssl) files and also has no other subfolders.

Old Template Files (Not in use anymore)
In case you would need your old data from previous templates you can check it here
/usr/local/cwpsrv/htdocs/resources/conf/web_servers/conf_templates

and for your custom templates check this folder
/usr/local/cwp/.conf/web_servers/conf_templates


If you have some issue with custom templates then you can check for the issue in the webserver logs
/var/log/cwp/webservers.log

If you get the vhost file renamed to .disabled that means it has some bad config or something was not good in it.