Apache Web Server (Linux)
Plesk for Linux uses the Apache HTTP Server (http://httpd.apache.org/) for hosting websites. Apache itself does not operate with websites; it manages virtual hosts, that is web resources identified either by an IP address or a host name. When you create a site, Plesk adds a new virtual host to Apache so that the site becomes available through the web server.
By default, to achieve better performance when delivering web content, Apache is supplemented with another web server - nginx. For the details about how Apache is integrated with nginx in Plesk and how to make Apache a standalone server, see Apache with nginx.
Default Web Server Configuration
/etc/httpd/conf/httpd.conf defines Apache configuration for all virtual hosts in the system. The configuration files for virtual hosts are on the lowest level of the configuration files hierarchy. They are included into the Apache configuration file (last_
httpd.conf) through several levels of inclusion using the include directive. The nginx web server is configured similarly: the
/etc/nginx/nginx.conf file includes the configuration files of all virtual hosts through several levels of inclusion. To learn about the hierarchy of configuration files, see Web Server Configuration Files in the Advanced Administration Guide.
Each virtual host in the system has two files -
last_nginx.conf - that define default Apache and nginx configuration for this virtual host correspondingly. These files (located in
/var/www/vhosts/system/<domain_name>/conf/) are generated automatically based on so-called configuration templates. Therefore, if you want to change the default web server configuration, you should adjust these template files. Learn how to do this in the Changing Virtual Hosts Settings Using Configuration Templates in the Advanced Administration Guide.
Custom Web Server Configuration
Website owners may need custom web server capabilities that are not provided by the default configuration. For example, unusual types of index files or the restricted access to the site by IP address. This can be done by overriding the default configuration for specific customers.
The default web server configuration can be overridden on the following levels:
The configuration defined on the service plan level overrides the default configuration. You can set any Apache and nginx directives for a particular service plan. These settings are stored in Plesk database and will be applied to all customers’ (plan subscribers’) websites by default. See Web Server (Apache).
Website (virtual host)
The custom virtual host (website) configuration overrides the configuration defined in its service plan. When you set Apache and nginx directives for a particular website, your directives are saved in the
vhost_nginx.conffiles (located in
You can configure web server settings for a website (virtual host) in two ways:
- By specifying your settings in the Customer Panel. When you save your changes, Plesk creates corresponding directives in the virtual host configuration files. For details, see Adjusting Apache Settings for Virtual Hosts and Adjusting nginx Settings for Virtual Hosts.
- By editing configuration files manually. For details, refer to the Advanced Administration Guide, Virtual Host Configuration Files.
Note: Only the Linux user
rootcan add or modify custom Apache and nginx configuration files manually.
Note that website settings work only for the selected website and are used instead of the default settings and the service plan level settings.
See the hierarchy of web server settings on the diagram below.