• Home
  • WordPress
  • web Hosting
    • Free hosting
    • Cheap Hosting
    • comparison cloud , vps, shared, wordpress
    • managed wordpress hosting
    • managed cloud hosting
  • page Speed
  • Deals
  • Services
  • About

RAaz Kumar .com

wordpress tutorials seo hosting etc


enable caching in apache server (mod cache disk cache) vs fastcgi cache

 what is caching & full page cache?

if apache server gets a request to sends to database through php.
the backend process also called as server response time or ttfb.
to avoid this
web server caches pages which frequently serving from database without any changes.
caching the page (dynamically generated) and stores it as static page for a time TTL setby server admin while configuring.
opcode cache, mysql object cache. page cache.
in wordpress it’s done w3tc, supercache by php.
but webserver lightweight and faster than php in most cases.
you can also try nginx as reverse proxy for apache caching

#1. Update package dependencies & install apache utils

apt-get update &&  apt-get install apache2-utils

#2 enable mod cache , cache disk expires headers modules

enable mods if not available then install.
sudo a2enmod cache
sudo a2enmod cache_disk
sudo a2enmod expires
sudo a2enmod headers
restart the apache server
sudo systemctl restart apache2

#3 edit the apache 2 config

sudo nano /etc/apache2/sites-available/example.com.conf
CacheQuickHandler offCacheLock onCacheLockPath /tmp/m
od_cache-lockCacheLockMaxAge 5CacheIgnoreHeaders
Set-Cookie<Location />
  CacheEnable disk    CacheHeader on
CacheDefaultExpire 800
CacheMaxExpire 64000
  CacheIgnoreNoLastMod On    ExpiresActive on
  ExpiresDefault A300</Location>

#3.1 understanding cache variables

 

location & size of the cache

if cache size is set to toohigh (checking the request in cache slower than without implementing cache)

Location of the hdd/SSD or ram

read& write speeds

hdd 100mbs

SSD 500mb

SSD nvme 3gb/s

ram 16gb/s

if cache size is lesser, say 300mb,

it’s better to use ram, if available,

cost of 1gb ram in cloud hosting $10* per month.1

gb SSD $1*permonth.(checkout gce ,AWS, do price calculator)

cache TTL or expiry: based on how frequently content changes, for WordPress blogposts

1hour not a issue,

dynamic sites it should be very lower, in minutes also called as microcaching in nginx

#4 check syntax errors & restart the apache server

sudo apachectl configtest && service apache2 reload
caching strategies

Cache Behind Web Server

front end cache serves without checking the server, php,MySQL, by linux sendfile () option.

 

Cache in Front of Web Server

If CacheQuickHandler is set to On,  then request go to apache then cache, faster than without cache, slower than frontend rache.

Nginx fastcgi cache  vs varnish

inorder to use fastcgi in apache you should install nginx as reverse proxy.
varnish is old & popular.but with new technologies like nginx fastcgi less used.
varnish cache: apache serves plain html pages
 without css&js in hight loads.

Related topics:

  1. how to enable KeepAlive connections in apache nginx wordpress
  2. Lamp stack install on Ubuntu 20.4 LTS apache, mysql, php 7.4(Debian 9 & Ubuntu 18.04 lts)
  3. enable browser caching in wordpress apache nginx caching headers explained
  4. 3 Ways (SCP, rsync, Sftp) linux server migration between two remote server apache nginx
  5. nginx fastcgi cache wordpress how to configure

tutorials

  • Vivek Bindra Videos Transcription (business strategy)
  • git commands
  • new relic php agent install in 3 steps
  • new relic mysql install integration - 2 ways fix problems
  • new relic installation linux (infrastructure agent , php, mysql , nginx)
  • xampp tutorials 2021 installation errors fix wordpress phpmyadmin mysql apache
  • Redis performance metrics & tuning for nginx apache ubuntu & debian
  • Devops course Syllabus topics PDF AWS, Azure, cisco, redhat
  • CCNA Syllabus pdf (CCNA / CCNP vs devops vs mcsa /MCSE)
  • how to create a website free of cost on google
  • what is vpn vs proxy vs tor, http vs https, http2, tcp vs udp, kali linux sql source code injection
  • nginx server tutorials (installation, configuration, performance tuning, security)
  • MySQL Tutorial (create,connect database, update tables, export etc) Documentation & TIPS
  • AUdio Editing Background Noise removal (Audacity, Adobe Premiere Addition, Camtasia Filmora Windows Obs)
  • Android Studio tutorials syllabus Topics Course details #AndroidApplicationDevelopment
  • [INTRO] Ethical hacking / cyber Security / Penetration testing Tutorial -{updates frequently}
  • redis install ubuntu 20.04 with wordpress php redis mysql configuration
  • ubuntu tutorials installation download issues etc
  • Php tutorials
  • HTML & CSS Tutorials
  • Core Java Tutorial Free online
  • Linux sysadmin tutorials linux system administrator
  • apache server tutorial (install,config, performance tuning, security, error handling)
    • what is If-Modified-Since HTTP header how to add to Wordpress website
    • htaccess tutorial tips for wordpress #redirect #leverage browser cache #Gzip #KeepAlive
    • apache modules list (explained, enable disable)
    • connect to server by SSH client Putty SFTP client winscp LAMP, LEMP nginx apache etc linux
    • Lamp stack install on Ubuntu 20.4 LTS apache, mysql, php 7.4(Debian 9 & Ubuntu 18.04 lts)
    • apache performance tuning mpm-worker vs prefork vs event modules
    • enable caching in apache server (mod cache disk cache) vs fastcgi cache
    • how to enable KeepAlive connections in apache nginx wordpress
    • Cache control Header & expires headers How to set Properly
    • apache2 conf sample explained apache configuration file modules etc
    • restart apache in ubuntu (start | stop | reload | config test) centos debian mac linux windows 10 xampp
    • uninstall apache2 ubuntu in 3 steps Debian

 

 

wordpress Pagespeed optimization

Digitalocean free $100 Credit

Cloudways Review pricing promo codes

Siteground cpu limits Pricing

Shared Hosting

Managed wordpress Hosting

Managed Hosting Cloud server

VPS Hosting

Cloud Hosting – Unmanaged

Google cloud Pricing

Aws Pricing

Azure pricing

nginx server tutorials

apache server tutorials

linux sysadmin tutorials

mysql Commands list pdf

LEMP Install Ubuntu

Mysql Performance Tuning

Nginx Performance tuning

Linux Performance tuning

Php -fpm performance tuning

Redis Performance tuning

linux server security

nginx security best practices

wordpress security plugins

 

 

wordpress

 

Top 5  WP Google Analytics Plugins

WP Backup Plugins

Wp Comment Plugins

Top wordpress Security Plugins

WP Seo Plugins

WP Caching Plugins

Best Adsense Plugins for WordPress

Wp social Sharing Plugins

autoshare social media plugins

WP speed Optimization Plugins

Speedup WordPress google Score

More Wp tuts

Server Admin Cloud

 

Installing Nginx LEMP On ubuntu

Installing apache Lamp ubuntu

nginx fastcgi cache enable

php – fpm install  & Configuration

Opcache install & Configure

php -fpm pool manager explained

Mysql Install & Configuration

Redis Object cache install & configure

 

Nginx as Reverse Proxy and Load balancer

Load Balance / auto scaling in google cloud

Linux Commands PDF

Mysql Commands Pdf

Letsencrypt tutorial

mysqldump export & import 

Pagespeed Module install & configure

nginx.conf best file

mysql.conf best file

upgrade ubuntu

© 2022 - All Rights Reserved Disclaimer & Privacy Policy