CityHost.UA
Help and support

Configuring Nginx

Nginx configuration is available in the control panel:

Which includes the following parameters:

Server Push allows an HTTP 2-compliant server to push resources to an HTTP2-compliant client before the client requests them. This is mostly a performance-enhancing technique that can be useful for preemptively loading resources. To use Server Push, most applications need to modify their code to include the Link header in all requests that have resources to be transferred. For example, if you have a web page named page.html that requires /css/style.css, you would add the following header to page.html:




This tells our border network to start serving /css/style.css whenever a visitor requests page.html. If style.css is already in the browser's local cache, the browser will ignore the push and cancel the download.

Cross-origin is a mechanism that allows restricted resources on a web page to be requested from a domain other than the domain from which the first resource was served. A web page can freely embed images from various sources, style sheets, scripts, frames, and videos. Certain "cross-domain" requests, especially Ajax requests, are disallowed by default by the same-origin security policy. CORS defines the way a browser and a server can interact to determine whether it is safe to allow a request from different sources.

The requested data, along with the Access-Control-Allow-Origin header with a wildcard * indicating that requests from all domains are allowed:

 Access-Control-Allow-Origin: *

404 -> Apache is redirecting requests with a 404 error to the Apache server. Useful for site-installed plugins and modules that dynamically generate static data.

Caching - adds expires header for static extensions:

(avi,bmp,bz2,css,doc,docx,eot,fla,flv,gif,gz,htm,html,ico,jpeg,jpg,js,mkv,mov,mp3,mp4,mpeg,mpg,odf,

odp,ods,odt,ogg,otf,pdf,png,ppt,pptx,rar,rtf,svg,swf,tar,tgz,ttf,txt,wav,wbmp,webp,wml,wmlc,wmls,

wmlsc,woff,woff2,xls,xlsx,zip)

The lifetime of the cache in days is the lifetime of the expires header.

Extensions list — a list of extensions provided by the Nginx server, which allows you to speed up the loading of the web page.


Similar articles