Custom NGINX Directives in cPanel via CloudNS (Custom nginx.conf / configuration)
Using our CloudNS nginx module, it is possible to apply your own custom 'nginx directives' (which are the nginx equivalents to .htaccess rules for Apache)
To enable a custom nginx configuration, please create / upload a file named 'nginx.conf' in the public_html directory of your account
example: /home/user/public_html/nginx.conf
Within this file, you would enter the configuration / directives that would normally reside within the 'server{}' tags of a standard nginx configuration file.
OVery popularSpeed up Wordpress using Full Page Caching (powered by Redis)
How to Enable Redis Caching
To enable full page caching, you will need to switch to native nginx by using the CLOUDNS plugin in cPanel. Note: In doing so, your PHP version will be driven by PHP-FPM, therefore the 'Select PHP Version' plugin in cPanel will no longer be used.
Go to CLOUDNS in cPanel
Click 'Configure' next to the domain you wish to enable Redis caching for
Select 'PHP' from the dropdown (which means switch to native nginx / php-fpm) and click Submit
From the BaVery popularCaching Methods for your Website - powered by Bolt-Cache
Here at Brixly, we offer a large number of caching methods all designed to improve site loading performance of your website or blog. Unlike many hosts, our belief is that the performance for your site should come be handled at 'server level' as opposed to using tons of 'plugins' in your site. Whilst we are 'optimized' by default using our incredibly efficient 'stack' (mod_lsapi / nginx reverse proxy) we do have a number of facilities available to improve page loading times even further. The majoVery popularCloudNS - How to enable DOS mitigation on your cPanel account
In computing, a denial-of-service attack (DoS attack) is a cyber-attack where the perpetrator seeks to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host connected to the Internet. Denial of service is typically accomplished by flooding the targeted machine or resource with superfluous requests in an attempt to overload systems and prevent some or all legitimate requests from being fulfilled. In a distributed denial-oSome readersHow to change PHP version when using CloudNS or Bolt-Cache (PHP-FPM)
How to change PHP version when you are using 'pure nginx' or have used 'CloudNS'
If you want to benefit from our PHP-FPM / Nginx stack (for enhanced performance) then the standard 'Select PHP Version' screen in cPanel will not change your PHP version. This is only effective when the CLOUDNS plugin has your Application Server set to 'Proxy'. If your account is using 'PHP' from the CLOUDNS plugin, then you are using 'PHP-FPM' (with pure nginx instead of apache). To change PHP versions when runSome readersHow to filter cross-site scripting within cPanel
Cross-site scripting (XSS) is a type of computer security vulnerability typically found in web applications. XSS enables attackers to inject client-side scripts into web pages viewed by other users. A cross-site scripting vulnerability may be used by attackers to bypass access controls such as the same-origin policy. Cross-site scripting carried out on websites accounted for roughly 84% of all security vulnerabilities documented by Symantec as of 2007. Bug bounty company HackerOne in 2017 reportSome readersHow to force www or non-www for a cPanel site (the easy way!)
It is recommended by Google that your site is only accessible via either www or without www (and NOT both). As such, you should configure a redirect to force one or the other. We provide a simple facility for doing this...
Login to cPanel
Go to 'Nginx Cluster Control' section and select 'CLOUDNS'
Select the domain you wish to enable the protection for from the dropdown list and click 'Configure'
Select 'Application Settings'
Select the preferred option from the 'www redirectSome readersWhat is Bolt-Cache?
What is Bolt-Cache?
Bolt-Cache is a plugin for cPanel, built by the developers at Brixly designed to drastically improve site loading speeds for WordPress (and many other) applications / sites.
Brixly uses a unique 'stack' for web hosting - by default its incredibly fast, but can be further 'tuned' to enhance performance. Bolt-Cache makes that process incredibly simple, with a 3 click interface giving you access to some of the worlds fastest caching technologies.
Our 'Stack' - DesignFew readersEnable 'slow logging' through CloudNS to diagnose slow PHP application performance
Modify the FPM Pool for the User
The following directives must be added to the users fpm pool...Few readersEnable Keep Alive Headers in cPanel (set page headers via CloudNS)
You can enable Keep Alive Headers via the CloudNS plugin available in our cPanel.
CloudNS -> Configure -> Application Settings
Then, you will see a header of 'Content Optimization' - the first option in that list is the 'set expires header' flag which when enabled will enable the keep-alive for you.
Bolt-Cache Expires Headers
If you have enabled any of the caching methods available via the Bolt-Cache plugin, then the expires headers will already be set.Few readersHow to protect your site against 'content type sniffing' using cPanel
Content sniffing, also known as media type sniffing or MIME sniffing, is the practice of inspecting the content of a byte stream to attempt to deduce the file format of the data within it. Content sniffing is generally used to compensate for a lack of accurate metadata that would otherwise be required to enable the file to be interpreted correctly. Content sniffing techniques tend to use a mixture of techniques that rely on the redundancy found in most file formats: looking for file signatures aFew readersHow to enable clickjacking protection in cPanel using CloudNS
Clickjacking (User Interface redress attack, UI redress attack, UI redressing) is a malicious technique of tricking a Web user into clicking on something different from what the user perceives they are clicking on, thus potentially revealing confidential information or taking control of their computer while clicking on seemingly innocuous web pages.
It is a browser security issue that is a vulnerability across a variety of browsers and platforms.
A clickjack takes the form of embedded code oFew readersAdd custom HTTP headers through CloudNS / Nginx
How do I send or set arbitrary HTTP headers using the Nginx web server at Brixly?
You need to use the add_header directive. It sends arbitrary HTTP header when the response code is equal to 200, 204, 301, 302 or 304.
The following lines can be added directly to your nginx.conf file (located in the public_html)
add_header name value
In this example, set X-Whom to www-node01:
add_header X-Whom www-node01
How Do I Test It?
Simply use curl as follows:
`$ curl -IFew readersCloudNS - How to redirect all domain 'alias' to the main domain using cPanel
If you have multiple domain names linked to your cPanel account as 'alias' domains, you can ensure they are all redirected to the main account domain by enabling the following within cPanel...
Login to cPanel
Go to 'Nginx Cluster Control' section and select 'CLOUDNS'
Select the domain you wish to enable the protection for from the dropdown list and click 'Configure'
Select 'Application Settings'
Enable the 'redirect_aliases' option
Click 'Submit'Few readersHow to exclude pages / paths from Redis caching (WordPress)
Within the CLOUDNS plugin, if you are using the Full Page Caching or the Full Page Caching + Nginx Helper for your WordPress site you may want to selectively 'exclude' content from the Redis caches.
To do so, you will first need to create an nginx.conf file within the public_html of your site - then, enter the following...
location /sample-page { set $wpcookienocache 1; try_files $uri $uri/ /index.php?$args; }Few readers