NGINX cache - How to manage the cache in cPanel and how to activate/deactivate it

The management of the NGINX caching system is manageable for all of you within cPanel and can be activated, deactivated or deleted the cache. Finally, the use of your website is also controlled through the .htaccess file present in the main "public_html" folder where the contents of your website are published.

The directives to add to the htaccess are the following:
<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=3600, public"
</filesMatch>

If you have an e-commerce it is advisable to disable the cache for the cart/payment method and we can offer you an example of how the htaccess for a given subfolder corresponds:

Poorly written programs don't set correct headers and send private data. This needs to be updated in the application and this section removed. This below is an example to add and to adapt according to your needs:
<If "%{REQUEST_URI} =~ /payment-methods/">
<IfModule mod_headers.c>
Pragma "no-cache" header set
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Expires "Thu, 1 Jan 1970 00:00:00 GMT"
</IfModule>
</If>

N.B.: The code above must be adapted according to the specific needs of your website and only if your e-commerce application has not been programmed properly to protect you from "unwanted manipulations" > in this case, contact the manager of a wordpress theme or search online to find out if your application is safe, otherwise it is more prudent to add this code.

Source: https://docs.cpanel.net/knowledge-base/web-services/nginx-with-reverse-proxy/

However, 4host remains available for you for customized adaptations according to your needs/needs and offers packages for securing your website with the use and activation of all systems for accelerating your website in such a way as to make your site fast and safe (above all safe). Please send us your requests by writing to sales@4host.ch or using the online form:

https://www.4host.ch/clienti/submitticket.php?step=2&deptid=6

  • nginx, cache, velocità, velocizzare, sistema di cache
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Quali dati FTP devo usare per caricare i files su Windows 2008 R2 (Enkompass)?

Quando 4Host prepara per il cliente il servizio, viene creato un nome account per l'hosting...

Cosa devo fare se voglio cambiare sistema operativo da linux a windows o viceversa del mio attuale servizio?

Per cambiamenti di sistema operativo es: Hosting all inclusive Linux > hosting windows è...

Come accedere alla bancadati MSSQL di Windows 2008R2 e come gestire le banche dati in generale

Per la gestione delle banche dati è necessario effettuare l'accesso al pannello di...

Non riesco ad accedere all'area clienti di 4host.ch, ho perso la email contenente i dati

Qualora non si ricordasse più i dati per accedere all'area clienti di 4host.ch >...

Desidero che i miei servizi e nomi a dominio vengano pagati automaticamente per 1 o più anni

Le fatture per tutti i piani hosting e tutti i servizi aggiuntivi (a pagamento annuale) vengono...