Apache and NGINX Settings

Plesk uses the Apache web server (About 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.

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 and NGINX Settings

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 PHP FPM

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.

Related Articles

Adding a Domain Forwarder

To create a domain forwarder in Plesk: Start creating a new domain in Websites & Domains > Add Domain and specify the following: In the Domain name box, type the domain

Configuring DNS for a Domain Cover Image

Configuring DNS for a Domain

The Domain Name System (DNS) is a hierarchical naming system that translates understandable domain names into the numerical identifiers (IP addresses) associated with web hosts.

Website Status 002

Website Status

The website status defines whether a website is available over the Internet and what hosting services are provided for it. The hosting provider may need to change

Website Hosting

WEBSITE HOSTING The Website hosting means that a website is physically located on the server. For the website hosting type you can specify: Document root. The location

Our Service Locations

The Palm Beaches

Coming Soon

Miami / Fort Lauderdale

Coming Soon