<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Control WebPanel Wiki &#187; vhost templates</title>
	<atom:link href="https://wiki.centos-webpanel.com/tag/vhost-templates/feed" rel="self" type="application/rss+xml" />
	<link>https://wiki.centos-webpanel.com</link>
	<description>CentOS WebPanel Wiki</description>
	<lastBuildDate>Wed, 12 Feb 2025 20:38:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>WebServers vhost templates</title>
		<link>https://wiki.centos-webpanel.com/webservers-vhost-templates</link>
		<comments>https://wiki.centos-webpanel.com/webservers-vhost-templates#comments</comments>
		<pubDate>Mon, 03 Dec 2018 09:06:28 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[vhost templates]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1052</guid>
		<description><![CDATA[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 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>WebServers vhost templates</strong><br />
<em>* Currently available only for centos 7, version 0.9.8.741+</em></p>
<p><object width="700" height="425"><param name="movie" value="https://www.youtube.com/v/1tedsdrp0rQ?version=3&amp;showinfo=0&amp;theme=light&amp;fs=1&amp;rel=0&amp;iv_load_policy=3&amp;modestbranding=1"></param><param name="allowScriptAccess" value="always"></param><param name="allowFullScreen" value="true"></param><embed src="https://www.youtube.com/v/1tedsdrp0rQ?version=3&amp;showinfo=0&amp;theme=light&amp;fs=1&amp;rel=0&amp;iv_load_policy=3&amp;modestbranding=1" type="application/x-shockwave-flash" allowScriptAccess="always" allowfullscreen="true" width="700" height="425"></embed></object></p>
<p><strong>Important !!!</strong><br />
<em>- Don't edit existing template files as this will be overwritten on the next cwp update.<br />
- Don't edit vhost directly for nginx, varnish, apache as this will be rebuilt with future cwp updates.</em></p>
<p>Templates location: /usr/local/cwpsrv/htdocs/resources/conf/web_servers/<br />
- Folder main contains main configuration for WebServers<br />
- Folder vhosts contains vhosts configuration for domains (this is what you need)</p>
<p><strong>How to create a template file</strong><br />
The easiest way to do that is to simply copy an existing file and then edit a new file you have created.<br />
Note that you need to have .tpl and .stpl files (tpl is for http and stpl is for https version)</p>
<p>Let's do one example for apache vhost with php-fpm</p>
<pre>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
</pre>
<p>Now you can edit these newly created template files.</p>
<p><strong>How to use custom created templates</strong><br />
To use a custom created templates you can simply select them from the admin panel<br />
left menu -> WebServer Settings -> WebServers Main Conf (to use as global server-wide)<br />
left menu -> WebServer Settings -> WebServers Domain Conf (to use for one domain only)</p>
<p><strong>Template folders explained</strong><br />
List from folder: /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/</p>
<p>httpd = apache templates<br />
nginx = nginx templates<br />
varnish = varnish templates<br />
php-fpm = php-fpm service templates (used for all php-fpm versions)</p>
<p><strong>httpd</strong> (subfolders explained)<br />
- main folder = default templates used with php-cgi, this is only httpd folder no subfolder<br />
- <b>php-fpm</b> folder = php-fpm templates used when server/domain is running php-fpm<br />
- <b>proxy</b> folder = proxy templates used when apache is used as proxy to other service/port</p>
<p><strong>nginx</strong> (subfolders explained)<br />
- main folder = default templates used as proxy templates, this is only nginx folder no subfolder<br />
- <b>php-fpm</b> folder = php-fpm templates used when server/domain is running nginx&#038;php-fpm</p>
<p><strong>varnish</strong> (no subfolders)<br />
- main folder = default templates used as proxy templates, varnish has no .stpl (https/ssl) files and also has no other subfolders</p>
<p><strong>php-fpm</strong> (no subfolders)<br />
- 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.</p>
<p><strong>Old Template Files</strong> (Not in use anymore)<br />
In case you would need your old data from previous templates you can check it here<br />
/usr/local/cwpsrv/htdocs/resources/conf/web_servers/conf_templates</p>
<p>and for your custom templates check this folder<br />
/usr/local/cwp/.conf/web_servers/conf_templates</p>
<hr />
If you have some issue with custom templates then you can check for the issue in the webserver logs<br />
/var/log/cwp/webservers.log</p>
<p>If you get the vhost file renamed to .disabled that means it has some bad config or something was not good in it.</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/webservers-vhost-templates/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
