Adjusting Apache and Nginx Settings

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

Note: All settings described here are

The settings are divided into two groups:

  • Common Apache settings

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

    Common_Apache_settings

  • 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.

    nginx_settings

    Use the following options to adjust how Apache and nginx must process requests:

    • Proxy mode.

      By default, this option is switched on, meaning that nginx works as a proxy server for Apache. The options below this one are active only if Proxy mode is switched on, and they enable you to specify how request processing must be divided between nginx and Apache.

      To use nginx without Apache for processing requests for any web content, turn off Proxy mode. This will make nginx handle all requests. Learn more about nginx-only hosting here.

    • Smart static files processing.

      Turning this option off limits the role of nginx. Nginx 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

      Note: Enabling this option results in requests for static files never reaching Apache or triggering Apache handlers. This means, for example, that rewrite rules or .htaccess directives would 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/.

      Note: Enabling this option results in requests for PHP files never reaching Apache or passing through Apache PHP handlers. This means that 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 feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.