Apache Web Server Settings

Plesk uses the Apache web server (http://en.wikipedia.org/wiki/Apache_HTTP_Server) to deliver the pages of your website to clients (such as browsers through which visitors access your website). By default, to achieve better performance, Apache is supplemented with another web server - nginx.

Default web server settings are specified by the server administrator (hosting provider). For example, these settings can determine how web servers process different types of files, how they use SSL, where they store log files, and so on.

However, you (as a website owner) can set up custom web server settings for your website. For example, add a type of the index file, restrict access to the site, and so on.

Note: You can adjust web server settings for your websites only if your hosting subscription provides the corresponding permission.

Next in this section:

Adjusting Apache Web Server Settings

 
Adjusting Apache Web Server Settings

All customizable web server settings are located on the Websites & Domains > domain name > Apache & nginx Settings page. Custom settings work only for the selected website.

Apache_Nginx

The settings are divided into two groups:

  • Common Apache settings.

    These settings are typically changed by site owners, who may want to add a type of index files (Index files), or a MIME type for files with a certain extension (MIME types), to restrict access to the site (Deny access to the site), or specify Apache handlers for a certain file type (Handlers).

  • nginx settings.

    These settings define how the processing of web requests is divided between the Apache and nginx web servers to achieve better performance for a specific site.

    Important: nginx settings are for advanced users only. The administrators can learn more about nginx settings in Adjusting nginx Settings for Virtual Hosts in the Administrator’s Guide.

    • Smart static files processing.

      Caution: Turn off this option only to troubleshoot nginx related issues.

      Turning this option off will limit the role of nginx: It will only pass requests and responses without modification. Except for troubleshooting the nginx related issues, we recommend that you leave this option turned on.

    • Serve static files directly by nginx.

      For sites with a lot of static content (like image or video files) and high load, better performance can be achieved by delegating serving static files to nginx. Apache will not take any part in processing the requests for the files with the specified extensions.

      For example, to exclude Apache from delivering jpg and gif files, you should turn on the option Serve static files directly by nginx and specify file extensions like this

      gif jpg

      or

      gif|jpg

      Caution: Because requests for static files never reach Apache, they do not pass through Apache handlers. This means, for example, that rewrite rules or .htaccess directives will not be applied.

    • Process PHP by nginx.

      When the Process PHP by nginx option is on, Apache does not take any part in processing the requests for PHP files. All requests for PHP files are processed by nginx using the PHP-FPM handler. The handlers used by Apache are not available on nginx. The PHP-FPM is an advanced version of FastCGI which offers significant benefits for highly loaded web applications. To learn more about PHP-FPM, see http://php-fpm.org/about/.

      Caution: Because requests for PHP files do not reach Apache they do not pass through its handlers (CGI, FastCGI, or an Apache module), so some web apps may not work as expected.

 

Note that subdomains have their own web server settings, therefore, when you change web server settings for a site that has subdomains, the subdomains will not receive these changes.

If you do not find the necessary setting, contact your server administrator (hosting provider), who can set up more custom settings for websites.

The Default Value of Server Settings

You can set the value of each parameter either by typing a custom value, or leaving the Default value. In the latter case, Plesk uses the values from the default web server configuration defined by the server administrator (hosting provider).

Your values override the default ones. The only exception is the Deny access to the site setting - IP addresses from the default configuration, as well as the IP addresses specified by you, will all be applied to your website. In case of a conflict (for example, when you allow the IP address that is denied in the default configuration), Apache uses your settings.

 

 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.