Plesk for Linux uses the Apache web server for websites hosting. In Plesk, Apache by default is supplemented with nginx to achieve better performance.
Apache itself does not operate with websites; it manages virtual hosts - web resources identified either by an IP address or a host name. When creating a site, Plesk adds a new virtual host to Apache so that the site becomes available through the web server. Plesk resides on a virtual host too; this host is called the default virtual host.
When you add a site in Plesk, you select one of the hosting types to use with it: web page hosting or forwarding. In terms of Apache, you associate the site with a virtual host of one of three configurations (website hosting, standard forwarding, and frame forwarding). To learn the differences between these configurations, see the section Virtual Hosts and Hosting Types.
Sites are linked to virtual hosts, so if you want to add some feature provided by Apache but not available through the Plesk GUI, you should change the virtual host settings using Apache configuration templates. Based on these templates, Plesk partly re-generates virtual hosts, so you should follow certain rules when modifying the configuration; otherwise, some of your changes might be lost. Next in this chapter, we will discuss virtual hosts in more detail and provide guidelines on how to modify them safely. To learn more on this point, refer to the section Changing Virtual Hosts Settings Using Configuration Templates.
Plesk creates virtual hosts for websites based on virtual host templates. These templates predefine the content that will be included in each new virtual host. Learn how to change virtual host templates in Administrator's Guide, section Presetting Content of Customer Websites.
You can get information on access to each virtual host and Apache errors that have occurred on the host from Apache logs. Learn more about log files location and rotation settings in the section Analyzing Access and Errors.
The term virtual host refers to the practice of running more than one website on a single server or IP address. For example, Apache can manage two websites, example1.com
and example2.com
, even if they use a single IP address. Each of these sites is hosted on a separate virtual host.
There are two types of virtual host, each with different methods of requests routing:
Plesk uses the name-based approach. In addition, Plesk provides an option to allocate separate IP addresses to customers who do not want to share their IP address with others. To implement this option, there are two types of IP address in Plesk:
When a client requests a certain domain, Apache parses the requested domain name. Then Apache searches for the virtual host with the requested domain on the IP address specified in the request. If the host exists, Apache sends the requested files from this host to the client.
If the requested virtual host is not found, Plesk uses the following entities to resolve the request: