Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Cache Wordpress, Nginx + Almalinux

views
     
TSUbuntuClient
post Sep 21 2024, 08:54 PM, updated 2y ago

Regular
******
Senior Member
1,417 posts

Joined: Jun 2007
From: /puchong/cyberjaya/klang



Hi,

Does anyone know how to do cache with nginx? Currently setup not as reverse proxy.

Most tutorial show using setup nginx as reverse proxy.

My setup as below.
> https://privatebin.net/?f90c11b99c7c2574#BG...wcWRetMrwC2Lv8m

CODE
[root@node1 ~]# curl -I https://mydomain.top
HTTP/2 200
server: nginx/1.24.0
date: Sat, 21 Sep 2024 12:49:32 GMT
content-type: text/html; charset=UTF-8
x-powered-by: PHP/8.1.29
x-powered-cache: MISS
link: <https://mydomain.top/wp-json/>; rel="https://api.w.org/"


Please advice.

Thanks,
SUSifourtos
post Sep 21 2024, 09:00 PM

Look at all my stars!!
*******
Senior Member
2,256 posts

Joined: Feb 2012



Use plugin cannot?
TSUbuntuClient
post Sep 21 2024, 09:25 PM

Regular
******
Senior Member
1,417 posts

Joined: Jun 2007
From: /puchong/cyberjaya/klang



QUOTE(ifourtos @ Sep 21 2024, 09:00 PM)
Use plugin cannot?
*
What you mean by use plugin?

I already use plugin powered cache.

Normal plugin will write rule to .htaccess. Since nginx not read .htaccess, so must be others workaround need to be done.
ketnave
post Sep 21 2024, 09:53 PM

Enthusiast
*****
Senior Member
868 posts

Joined: Sep 2009
From: douchistan, pekopon


QUOTE(UbuntuClient @ Sep 21 2024, 08:54 PM)
Hi,

Does anyone know how to do cache with nginx? Currently setup not as reverse proxy.

Most tutorial show using setup nginx as reverse proxy.

My setup as below.
> https://privatebin.net/?f90c11b99c7c2574#BG...wcWRetMrwC2Lv8m

CODE
[root@node1 ~]# curl -I https://mydomain.top
HTTP/2 200
server: nginx/1.24.0
date: Sat, 21 Sep 2024 12:49:32 GMT
content-type: text/html; charset=UTF-8
x-powered-by: PHP/8.1.29
x-powered-cache: MISS
link: <https://mydomain.top/wp-json/>; rel="https://api.w.org/"


Please advice.

Thanks,
*
Have you tried https://www.linode.com/docs/guides/how-to-u...with-wordpress/ ?
TSUbuntuClient
post Sep 21 2024, 09:58 PM

Regular
******
Senior Member
1,417 posts

Joined: Jun 2007
From: /puchong/cyberjaya/klang



QUOTE(ketnave @ Sep 21 2024, 09:53 PM)
Yes, already follow this but result as below.
CODE

HTTP/2 200
server: nginx/1.24.0
date: Sat, 21 Sep 2024 13:55:11 GMT
content-type: text/html; charset=UTF-8
x-powered-by: PHP/8.1.29
x-powered-cache: MISS
link: <https://mydomain.top/wp-json/>; rel="https://api.w.org/"
x-fastcgi-cache: HIT

TSUbuntuClient
post Sep 21 2024, 10:10 PM

Regular
******
Senior Member
1,417 posts

Joined: Jun 2007
From: /puchong/cyberjaya/klang



QUOTE(ketnave @ Sep 21 2024, 09:53 PM)
Follow back this tutorial, replace powered cache with nginx cache plugin.

Manage to get result HIT.

Thanks to all. rclxm9.gif rclxm9.gif

 

Change to:
| Lo-Fi Version
0.0151sec    0.40    5 queries    GZIP Disabled
Time is now: 21st December 2025 - 09:36 PM