
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Deleted: | ||||||||
| < < |
| |||||||
Changes Contained within a VirtualHost Directive | ||||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
Changes Contained within a VirtualHost Directive | ||||||||
| Line: 122 to 122 | ||||||||
Custom Templates for New Accounts | ||||||||
| Changed: | ||||||||
| < < | When a new account, subdomain, or addon domain is created, the templates located in /var/cpanel/templates/ are not used. Instead, the system uses the following files: | |||||||
| > > | When a new account is created, the templates located in /var/cpanel/templates/ are not used. Instead, the system uses the following files: | |||||||
| ||||||||
| Line: 131 to 131 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < | /scripts/upcp). | |||||||
| > > | .local file) within these directories. To create a custom template, you may rewrite the contents of a file, using the same filename. However, each of these files will be overwritten any time you update cPanel (run /scripts/upcp). | |||||||
To maintain custom templates for new accounts:
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
Custom Templates for Subdomains and Addon Domains | ||||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
Changes Contained within a VirtualHost Directive | ||||||||
| Line: 122 to 122 | ||||||||
Custom Templates for New Accounts | ||||||||
| Changed: | ||||||||
| < < | When a new account, subdomain, or addon domain is created, the templates located in /var/cpanel/templates/ are not used. However, you are still able to define a template for these events. To do so, you will need to edit the files located at: | |||||||
| > > | When a new account, subdomain, or addon domain is created, the templates located in /var/cpanel/templates/ are not used. Instead, the system uses the following files: | |||||||
| ||||||||
| Line: 131 to 131 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < | .local file) within these directories. To create a custom template, you may rewrite the contents of a file, using the same filename. However, each of these files will be overwritten any time you update cPanel (run /scripts/upcp). To maintain custom templates for new accounts, you will need to create a postupcp script. This script will automatically run after every cPanel update, replacing the contents of the file with your custom template. For more information on creating a postupcp script, you can visit our documentation here. | |||||||
| > > | /scripts/upcp).
To maintain custom templates for new accounts:
| |||||||
Custom Templates for Subdomains and Addon Domains | ||||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
Changes Contained within a VirtualHost Directive | ||||||||
| Line: 131 to 131 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < | Unlike the templates located in /var/cpanel/templates/, you will not need to copy and rename the template files. Simply edit the contents of the file to match how you would like new accounts, subdomains, and addon domains to be configured. | |||||||
| > > | .local file) within these directories. To create a custom template, you may rewrite the contents of a file, using the same filename. However, each of these files will be overwritten any time you update cPanel (run /scripts/upcp). To maintain custom templates for new accounts, you will need to create a postupcp script. This script will automatically run after every cPanel update, replacing the contents of the file with your custom template. For more information on creating a postupcp script, you can visit our documentation here. | |||||||
Custom Templates for Subdomains and Addon Domains | ||||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
Changes Contained within a VirtualHost Directive | ||||||||
| Line: 119 to 120 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < | Custom Templates for New Accounts, Subdomains, and Addon Domains | |||||||
| > > | Custom Templates for New Accounts | |||||||
| When a new account, subdomain, or addon domain is created, the templates located in /var/cpanel/templates/ are not used. However, you are still able to define a template for these events. To do so, you will need to edit the files located at: | ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
/var/cpanel/templates/, you will not need to copy and rename the template files. Simply edit the contents of the file to match how you would like new accounts, subdomains, and addon domains to be configured.
Custom Templates for Subdomains and Addon DomainsTo create custom template files that affect your subdomains and addon domains:
.local file(s) will be used in place of the .default file(s). | |||||||
Custom Templates for Parked Domains | ||||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
Changes Contained within a VirtualHost Directive | ||||||||
| Line: 122 to 122 | ||||||||
Custom Templates for New Accounts, Subdomains, and Addon DomainsWhen a new account, subdomain, or addon domain is created, the templates located in /var/cpanel/templates/ are not used. However, you are still able to define a template for these events. To do so, you will need to edit the files located at: | ||||||||
| Deleted: | ||||||||
| < < |
| |||||||
| Changed: | ||||||||
| < < | Unlike the templates located in /var/cpanel/templates/, you will not need to copy and rename the template files. Simply edit the contents of the file to match how you would like new accounts, subdomains, and addon domains to be configured. | |||||||
| > > |
| |||||||
Custom Templates for Parked DomainsParked domains are simply aliased to your server. There are no custom templates for you to edit as they are not needed. | ||||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
| Changed: | ||||||||
| < < | Changes Contained within a VirtualHost Directive | |||||||
| > > | Changes Contained within a VirtualHost Directive | |||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
Changes Contained within a VirtualHost Directive | ||||||||
| Changed: | ||||||||
| < < | ||||||||
| > > | ||||||||
| Line: 150 to 150 | ||||||||
| Manually editing a YAML file (such as the userdata file) can break the YAML format. Use a tool, such as the command in step 5 above, to edit it for you. \ No newline at end of file | ||||||||
| Added: | ||||||||
| > > |
| |||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
Changes Contained within a VirtualHost Directive | ||||||||
| Line: 64 to 64 | ||||||||
For additional information, use the following command:
| ||||||||
| Changed: | ||||||||
| < < | To update include files for a particular user, execute the following command: | |||||||
| > > | To ensure that cPanel-created include files (whose filenames begin with cp_) are in sync with a particular user's settings (or "userdata"), execute the following command: | |||||||
| ||||||||
| Changed: | ||||||||
| < < | To update include files for all users, execute the following command: | |||||||
| > > | To ensure that cPanel-created include files (whose filenames begin with cp_) are in sync with all users' settings (or "userdata"), execute the following command: | |||||||
| ||||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
Changes Contained within a VirtualHost Directive | ||||||||
| Line: 18 to 18 | ||||||||
| VirtualHost containers can also accept include files. However, at this point, there is no graphical interface for creating and managing these includes. This means that, if you would like to use an include inside a VirtualHost container, you will have to add and manage it manually.
It is important to note that the include directory structure is not created for you. You will need to create and use the following file structures: For an individual VirtualHost container: | ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
| Line: 88 to 88 | ||||||||
To create custom template files that affect all virtual hosts:
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
| Line: 102 to 102 | ||||||||
To create a custom template that affects only a single virtual host:
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
Changes Contained within a VirtualHost Directive | ||||||||
| Line: 18 to 18 | ||||||||
| VirtualHost containers can also accept include files. However, at this point, there is no graphical interface for creating and managing these includes. This means that, if you would like to use an include inside a VirtualHost container, you will have to add and manage it manually.
It is important to note that the include directory structure is not created for you. You will need to create and use the following file structures: For an individual VirtualHost container: | ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
For all VirtualHost containers:
| ||||||||
| Line: 40 to 40 | ||||||||
For all VirtualHost containers with SSL or standard VirtualHosts with version-specific settings:
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
Includes are located as the last directive in a VirtualHost container. This allows you to override default values using the include files. Include files that begin with cp_ are reserved for cPanel settings. These settings will most likely be overwritten automatically. Thus, altering these files is probably futile. | ||||||||
| Line: 120 to 121 | ||||||||
Custom Templates for New Accounts, Subdomains, and Addon DomainsWhen a new account, subdomain, or addon domain is created, the templates located in /var/cpanel/templates/ are not used. However, you are still able to define a template for these events. To do so, you will need to edit the files located at: | ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
Unlike the templates located in /var/cpanel/templates/, you will not need to copy and rename the template files. Simply edit the contents of the file to match how you would like new accounts, subdomains, and addon domains to be configured.
Custom Templates for Parked Domains | ||||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
Changes Contained within a VirtualHost Directive | ||||||||
| Line: 112 to 112 | ||||||||
| ||||||||
| Added: | ||||||||
| > > |
| |||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > | ||||||||
Custom Templates for New Accounts, Subdomains, and Addon DomainsWhen a new account, subdomain, or addon domain is created, the templates located in /var/cpanel/templates/ are not used. However, you are still able to define a template for these events. To do so, you will need to edit the files located at: | ||||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
| Changed: | ||||||||
| < < | Changes contained within a VirtualHost directive | |||||||
| > > | Changes Contained within a VirtualHost Directive | |||||||
| Line: 18 to 18 | ||||||||
| VirtualHost containers can also accept include files. However, at this point, there is no graphical interface for creating and managing these includes. This means that, if you would like to use an include inside a VirtualHost container, you will have to add and manage it manually.
It is important to note that the include directory structure is not created for you. You will need to create and use the following file structures: For an individual VirtualHost container: | ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
For all VirtualHost containers:
| ||||||||
| Line: 39 to 39 | ||||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| For all of a user’s containers for SSL or standard VirtualHosts with version-specific settings: | ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| For individual VirtualHost containers for SSL or standard VirtualHosts with version-specific settings: | ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
Includes are located as the last directive in a VirtualHost container. This allows you to override default values using the include files. Include files that begin with cp_ are reserved for cPanel settings. These settings will most likely be overwritten automatically. Thus, altering these files is probably futile. | ||||||||
| Line: 87 to 87 | ||||||||
To create custom template files that affect all virtual hosts:
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
| Changed: | ||||||||
| < < | ||||||||
| > > | .local file(s) will be used in place of the .default file(s). | |||||||
Custom templates that will apply to a single virtual host when rebuilding an existing Apache configurationTo create a custom template that affects only a single virtual host:
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| ||||||||
| Deleted: | ||||||||
| < < | | |||||||
| ||||||||
| Line: 121 to 119 | ||||||||
Custom Templates for New Accounts, Subdomains, and Addon DomainsWhen a new account, subdomain, or addon domain is created, the templates located in /var/cpanel/templates/ are not used. However, you are still able to define a template for these events. To do so, you will need to edit the files located at: | ||||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < | Unlike the templates located in /var/cpanel/templates/, you will not need to copy and rename the template files. Simply edit the contents of the file to match how you would like new accounts, subdomains, and addon domains to be configured. | |||||||
| > > | Unlike the templates located in /var/cpanel/templates/, you will not need to copy and rename the template files. Simply edit the contents of the file to match how you would like new accounts, subdomains, and addon domains to be configured. | |||||||
Custom Templates for Parked DomainsParked domains are simply aliased to your server. There are no custom templates for you to edit as they are not needed. | ||||||||
| Line: 144 to 142 | ||||||||
| That is a YAML-format entry of a single key/value pair of a hash. This means that there is a corresponding key called "foo" with a value of "hello world," that you are able to use in your template. | ||||||||
| Changed: | ||||||||
| < < | Foo "[% vhost.foo %]" would render as Foo "hello world" | |||||||
| > > | Foo "[% vhost.foo %]" would render as Foo "hello world" | |||||||
| Manually editing a YAML file (such as the userdata file) can break the YAML format. Use a tool, such as the command in step 5 above, to edit it for you. | ||||||||
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Added: | ||||||||
| > > |
Changes contained within a VirtualHost directiveThis section regards custom changes tohttpd.conf inside a VirtualHost directive.
Using Include FilesVirtualHost containers can also accept include files. However, at this point, there is no graphical interface for creating and managing these includes. This means that, if you would like to use an include inside a VirtualHost container, you will have to add and manage it manually. It is important to note that the include directory structure is not created for you. You will need to create and use the following file structures:For an individual VirtualHost container:
cp_ are reserved for cPanel settings. These settings will most likely be overwritten automatically. Thus, altering these files is probably futile.
After adding new include files, you will need to check for compatibility. To verify that the include files are valid with Apache, run the following command in a terminal session:
Apache Config DistillerWith regard to VirtualHost data, the Apache config distiller does not update the templates in any way. The distiller, in this case, simply updates the datastores within /var/cpanel/userdata. This means that direct edits made to a VirtualHost withinhttpd.conf can be preserved.
To ensure that your direct edits have been preserved, you can use the following script:
httpd.conf file by using the following script:
Custom Templateshttpd.conf file. This will result in a server that doesn’t respond to HTTP requests. Use caution when creating custom templates and remember to place directives that rely on the certain Apache modules within appropriate <IfModule> blocks.
Custom templates that will apply to all virtual hosts when rebuilding an existing Apache configurationTo create custom template files that affect all virtual hosts:
Custom templates that will apply to a single virtual host when rebuilding an existing Apache configurationTo create a custom template that affects only a single virtual host:
Custom Templates for New Accounts, Subdomains, and Addon DomainsWhen a new account, subdomain, or addon domain is created, the templates located in /var/cpanel/templates/ are not used. However, you are still able to define a template for these events. To do so, you will need to edit the files located at:
Custom Templates for Parked DomainsParked domains are simply aliased to your server. There are no custom templates for you to edit as they are not needed.More info about files in /var/cpanel/userdata/Files located within subdirectories of the /var/cpanel/userdata/ directory are written in YAML format (for more information, see http://yaml.org/). In addition, these files are loaded into a template variable called 'vhost.' For more information, see http://template-toolkit.org/. For example, inside of a YAML file, you may see a line that looks like this:foo: hello world
That is a YAML-format entry of a single key/value pair of a hash. This means that there is a corresponding key called "foo" with a value of "hello world," that you are able to use in your template.
Foo "[% vhost.foo %]" would render as Foo "hello world"
Manually editing a YAML file (such as the userdata file) can break the YAML format. Use a tool, such as the command in step 5 above, to edit it for you.
| |||||||