What is the best and fastest scenario for cache?

Right now I run Hestia with nginx and apache2. I set this server up many years ago I’m going to keep everything up to date but I’m just wondering if there is a better scenario now. nginx alone or with something else? And lastly is WP Rocket needed or not? What is the best caching scenario for speed nowadays.

1 Like

Fast CGI (Nginx only) + Redis cache is my to go setup …

1 Like

so the best way to Switch over to that would be to set up a new server in a new install and then just migrate the websites am I correct? And also you don’t use any plug in like wp rocket?

Yes. I don’t use any plugins like wp rocket. Only Redis Cache plugin in

1 Like

Redis server + php package

I’m just trying to get this figured out so I can do it right the first time I host a lot of people’s websites and if I set up a new server and migrate things over I just want it to be right.

And nobody answered this post?

nitinnaresh

Felix

Nov 2020

after all this, do we need any wordpress plugin to use this redis server or it will automatically start working?

I have checked that wordpress has some plugin by tim kurtis?

So there’s no way to uninstall Apache2 and reconfigure the current server I have without starting over?

You need to install this plugin on WordPress

Redis Object Cache

On CLI you have to install the packages redis-server and php8.2-redis (customize for your PHP version)

1 Like

thank you, what about removing Apache2

is the correct way to remove apache2:

#!/bin/bash

# Function Description
# Manual upgrade script from Nginx + Apache2 + PHP-FPM to Nginx + PHP-FPM

#----------------------------------------------------------#
#                    Variable&Function                     #
#----------------------------------------------------------#

# Includes
# shellcheck source=/etc/hestiacp/hestia.conf
source /etc/hestiacp/hestia.conf
# shellcheck source=/usr/local/hestia/func/main.sh
source $HESTIA/func/main.sh
# shellcheck source=/usr/local/hestia/conf/hestia.conf
source $HESTIA/conf/hestia.conf

#----------------------------------------------------------#
#                    Verifications                         #
#----------------------------------------------------------#

if [ "$WEB_BACKEND" != "php-fpm" ]; then
	check_result $E_NOTEXISTS "PHP-FPM is not enabled" > /dev/null
	exit 1
fi

if [ "$WEB_SYSTEM" != "apache2" ]; then
	check_result $E_NOTEXISTS "Apache2 is not enabled" > /dev/null
	exit 1
fi

#----------------------------------------------------------#
#                       Action                             #
#----------------------------------------------------------#

# Remove apache2 from config
sed -i "/^WEB_PORT/d" $HESTIA/conf/hestia.conf $HESTIA/conf/defaults/hestia.conf
sed -i "/^WEB_SSL/d" $HESTIA/conf/hestia.conf $HESTIA/conf/defaults/hestia.conf
sed -i "/^WEB_SSL_PORT/d" $HESTIA/conf/hestia.conf $HESTIA/conf/defaults/hestia.conf
sed -i "/^WEB_RGROUPS/d" $HESTIA/conf/hestia.conf $HESTIA/conf/defaults/hestia.conf
sed -i "/^WEB_SYSTEM/d" $HESTIA/conf/hestia.conf $HESTIA/conf/defaults/hestia.conf

# Remove nginx (proxy) from config
sed -i "/^PROXY_PORT/d" $HESTIA/conf/hestia.conf $HESTIA/conf/defaults/hestia.conf
sed -i "/^PROXY_SSL_PORT/d" $HESTIA/conf/hestia.conf $HESTIA/conf/defaults/hestia.conf
sed -i "/^PROXY_SYSTEM/d" $HESTIA/conf/hestia.conf $HESTIA/conf/defaults/hestia.conf

# Add Nginx settings to config
echo "WEB_PORT='80'" >> $HESTIA/conf/hestia.conf
echo "WEB_SSL='openssl'" >> $HESTIA/conf/hestia.conf
echo "WEB_SSL_PORT='443'" >> $HESTIA/conf/hestia.conf
echo "WEB_SYSTEM='nginx'" >> $HESTIA/conf/hestia.conf

# Add Nginx settings to config
echo "WEB_PORT='80'" >> $HESTIA/conf/defaults/hestia.conf
echo "WEB_SSL='openssl'" >> $HESTIA/conf/defaults/hestia.conf
echo "WEB_SSL_PORT='443'" >> $HESTIA/conf/defaults/hestia.conf
echo "WEB_SYSTEM='nginx'" >> $HESTIA/conf/defaults/hestia.conf

rm $HESTIA/conf/defaults/hestia.conf
cp $HESTIA/conf/hestia.conf $HESTIA/conf/defaults/hestia.conf

# Rebuild web config

for user in $($BIN/v-list-users plain | cut -f1); do
	echo $user
	for domain in $($BIN/v-list-web-domains $user plain | cut -f1); do
		$BIN/v-change-web-domain-tpl $user $domain 'default'
		$BIN/v-rebuild-web-domain $user $domain no
	done
done

systemctl restart nginx

So I ran the above, didnt see any errors and apache was gone after. Then got this on all websites (see atached pic)


Recovered all from my veeam backup now. Like I said before I do this I need to Figure out how to do this the first time the right way to avoid any down time for my corporate clients. That’s why I’m on the form so if anybody can give me any input that would be great.

You need to update the templates as it doesn’t support .htaccess any more…

Templates? webserver templates? WordPress templates, theme templates??? If everybody could just give a little bit more information there are templates everywhere. what templates? Just a little more info I think it would save a lot of time. Going back and forth with tiny bits and pieces makes it really tough to figure things out.

Googleing uninstall apache2 update templates - nothing,

and .htaccess files are in every folder of WordPress. So it you can just let me know what to do I would be grateful. thank you.

So how will my links work once I remove Apache and get rid of the .htaccess file(s) I depend on my permalinks for everything.

Edit the web domain on Hestia Control Panel, update the Web Domain template and save

Thank you.
What would you recommend for the FastCGI deration?

and do you know what Causes this?
Error: nginx restart failed

All was going good and then Nginx


failed to restart and I can’t get it to restart.

systemctl status nginx in command line

Okay I will try that.

And it only happens on A specific two websites when I enable FastCGI.

All the other websites I can enable FastCGI and all is good nginx loads,

but when I enable CGI on two of my websites it stops nginx from loading, Not sure what’s going on with these two websites or where to look at what would be causing that?

Yeah everything is working good on all the other sites it’s just these two sites I cannot enable fast CGI on not sure what’s going on?

https://pacificdatacom.net/

Next is the redis install so just making sure I need the fastcgi on or off?

Yeah that’s weird I still can’t turn fast CGI on those two websites above or nginx won’t load?

Also again I’d like to install Redis so do I need fast CGI on or off?

And if you can please list the best way to install the Redis and the PHP?

Thank you I’m working through this getting closer. I am running php 8.2.

and should I go to PHP 8.3?