## Creating Templates

To implement a hosting plan (or simplify setup of multiple domains), create a domain template, and define hosting services and resource allotments in accordance with your hosting plan:

1. On your Home page, click the Domain Templates icon in the Tools group.
2. Click Add Domain Template.
3. Specify the template properties:
   1. Template name. Specify a name for this template. During setup of a new hosting account, you will be prompted to select the required template by its name. Therefore, we recommend that you choose a meaningful name that corresponds to one of your hosting plans or describes the amount of allotted resources. For example, Mail hosting, 1GB disk space, 500 mailboxes.
   2. Mail to nonexistent users. Specify the domain-wide mail bounce options: When somebody sends an e-mail message to an e-mail address that does not exist under your domain, the mail server on your domain accepts mails, processes it, and when it finds out that there is no such a recipient under your domain, it returns the mail back to sender with the "this address no longer accepts mail" notice. You can choose to:
   - change the default notice if you do not like it (leave the Bounce with message option selected and type another message into the input box),
   - forward undelivered mail to another e-mail address (select the Forward to address option and specify the e-mail address you need), or
   - reject mail without accepting it (select the Reject option). This setting can decrease mail server load caused by a large amount of spam, which is often directed at randomly generated user names. However, for spammers this can somewhat speed up scanning your mail server for valid e-mail addresses.
   1. WebMail. Specify whether the users of mailboxes in this domain should be able to read their mail through a browser based WebMail application.
   2. Maximum number of subdomains. Specify the number of subdomains that can be hosted under this domain.
   3. Maximum number of domain aliases. Specify the total number of additional alternative domain names that the site owner will be able to use for his or her web site.
   4. Disk space. Specify the total amount of disk space allocated to a hosting account associated with the domain. This amount is measured in megabytes. It includes disk space occupied by all files related to this domain/web site: web site contents, databases, applications, mailboxes, log files and backup files. This is the so-called soft quota: when it is exceeded, domain names and web sites are not suspended automatically, only the appropriate notices are sent to your and your provider's e-mail addresses and the resource overage is indicated by the icon shown in the control panel to the left of the domain name (see the list of domain names on your Home page). And then you can do the following:
      - you can notify the domain owner and suspend the domain/web site after a grace period until you receive the payment (not so good for your business, but if you are going to follow that way, see the chapter "Suspending and Unsuspending Domains and Web Sites"),

        or

      - upgrade the hosting plan for your customer (see the instructions on upgrading hosting plans further in this section).
   5. Maximum amount of traffic. Specify the amount of data in megabytes that can be transferred from the web site during a month. Once the limit is reached, the appropriate notices are sent to your and your provider's e-mail addresses and the resource overage is indicated by a corresponding icon shown in the control panel to the left of the domain name (see the list of domain names on your Home page). When a web site starts attracting more visitors and requires more bandwidth, consider upgrading a hosting plan (see the instructions on upgrading hosting plan below).
   6. Maximum number of web users. Specify the number of personal web pages that the domain owner can host for other users under his or her domain. This service is mostly used in educational institutions that host non-commercial personal pages of their students and staff. These pages usually have web addresses like http://your-domain.com/~username. If you wish to allow execution of scripts embedded in personal web pages, select also the Allow the web users scripting check box. See the Hosting Personal Web Pages on Your Web Server section for details.
   7. Maximum number of databases. Specify the number of databases that can be hosted in a domain.
   8. Maximum number of mailboxes. Specify the number of mailboxes that can be hosted in a domain.
   9. Mailbox quota. Specify the amount of disk space in kilobytes that is allocated to each mailbox in a domain.
   10. Maximum number of mail forwarders. Specify the number of mail forwarders that can be used in a domain.
   11. Maximum number of mail autoresponders. Specify the number of automatic responses that can be set up in a domain.
   12. Maximum number of mailing lists. Specify the number of mailing lists that the domain owner can run in a domain. The mailing lists are served by the GNU Mailman software, which may or may not be installed on the server. If it is not installed and you or your customers would like to use it, ask your provider to install it. To allow the use of mailing lists, you should also put a check mark into the Mailing lists check box under the Preferences group.
   13. Maximum number of Java applications. Specify the maximum number of Java applications or applets that the domain owner can install in a domain.
   14. Validity period. Specify the term for a hosting account. At the end of the term, the domain/web site will be suspended, its Web, FTP and mail services will no longer be accessible to the Internet users, and domain owner will not be able to log in to the control panel. Hosting accounts cannot be automatically renewed, therefore, in order to bring the hosted domain name/web site back to operation, you will need to manually renew the hosting account: on your Home page, click the domain name your need, click the Limits icon, specify another term in the Validity period box, click OK, then click the Enable icon in the Domain group (Home > domain name).
   15. Log rotation. All connections to the Web server and requests for files that were not found on the server are registered in log files. These log files are analyzed by the statistical utilities running on the server, which then present graphical reports on demand. If you need to view the contents of these raw log files for debugging purposes, on your Home page, click the domain name you need, click Log Manager, and then click the log file name you need. To prevent these log files from growing too large, you should enable automatic cleanup and recycling of log files:
       - select the Switch on log rotation check box,
       - specify when to recycle log files,
       - specify how many instances of each log file processed by Plesk's statistical utilities to store on the server,
       - specify whether they should be compressed,
       - specify whether they should be sent to an e-mail address after processing.
   16. Traffic statistics retention. Specify the number of months during which the bandwidth usage statistics should be kept on the server.
   17. DNS. Specify whether the DNS server on your Web host should act as a master (primary) or slave (secondary) name server for the domain name zone. A primary name server stores locally the zone file it serves, while a secondary server only retrieves a copy of this file from the primary. You would normally leave the Master option selected.
   18. Physical hosting account. If you are going to host not only domain names, but also web sites, select the Physical hosting check box and specify the hosting features:
   - Hard disk quota. In addition to the soft quota, you can specify the so-called hard quota that will not allow writing more files to the web space when the limit is reached. At attempt to write files, users will get "Out of disk space" error.
   - SSL support. Secure Sockets Layer encryption is generally used for protecting transfer of sensitive data during online transactions on e-commerce Web sites that run on dedicated IP addresses. SSL certificates that participate in the encryption process are usually applied to a single domain name on a single IP address, therefore, each site that needs SSL protection must be hosted on a dedicated IP address. An exception to this is subdomains, which you can protect with a wildcard certificate. Installing an SSL certificate on a Web server that hosts several web sites with different domain names on a single IP address (shared or name-based hosting) is technically possible, however, it is not recommended: the encryption will be provided, but users will get warning messages on attempt to connect to the secure site. To allow SSL encryption for Web sites, select the SSL support check box.
   - Use a single directory for housing SSL and non-SSL content. By default, when users publish their sites through their FTP accounts, they need to upload the web content that should be accessible via secure connections to the `httpsdocs` directory, and the content that should be accessible via plain HTTP, to the `httpdocs` directory. For the convenience of publishing all content through a single location ? `httpdocs` directory, select the Use a single directory for housing SSL and non-SSL content check box.
   - FrontPage support. Microsoft FrontPage is a popular web site authoring tool. To enable users to publish and modify their sites through Microsoft FrontPage, select the FrontPage support and FrontPage over SSL support check boxes and set the FrontPage authoring option to allowed.
   - Support for programming and scripting languages widely used in development of dynamic Web sites and server-side Web applications. Specify which of the following programming and scripting languages should be interpreted, executed or otherwise processed by the web server: Active Server Pages (ASP), Server Side Includes (SSI), PHP hypertext preprocessor (PHP), Common Gateway Interface (CGI), Fast Common Gateway Interface (FastCGI), Perl, Python, ColdFusion, and Miva scripting required for running Miva e-commerce solutions.
   - Web statistics. To allow domain/web site owner to view the information on the number of people visited his or her site and the pages of the site they viewed, select the statistical package you need from the Web statistics menu (AWStats is recommended), and select the accessible via password protected directory /plesk-stat/ check box. This will install the statistical software of your choice, which will generate reports and place them into the password-protected directory. The domain/web site owner will then be able to access Web statistics at the URL: https://your-domain.com/plesk-stat/webstat using their FTP account login and password.
   - Custom error documents. When visitors coming to your site request pages that the web server cannot find, the web server generates and displays a standard HTML page with an error message. If you wish to create your own error pages and use them on your web server or allow your customers to do that, select the Custom error documents check box.
   - Shell access to server with FTP user's credentials. This allows a site owner to upload securely web content to the server through a Secure Socket Shell connection, however, allowing shell access also poses a potential threat to the server security, so we recommend that you do not allow shell access. Leave the Forbidden option selected.
4. Click OK to complete creation of a template.

   During setup of a hosting account for a new domain/web site, you will select the required template and the hosting account will be created and allocated the resources and hosting services you defined.