yes,the wordpress plugin is also active on the site, is there anything else I need to do?

yes,the wordpress plugin is also active on the site, is there anything else I need to do?

I did everytingh and I get no HIT.
PROBLEM: when I comment the line "include-php-74.conf" I get an Nginx 502 Bad Gateway on website.
I checked all paths and permitions and all seems ok.
This is the Headers I get:
cache-control: no-store, no-cache, must-revalidate
content-encoding: gzip
content-type: text/html; charset=UTF-8
date: Wed, 15 Dec 2021 11:23:56 GMT
expires: Thu, 19 Nov 1981 08:52:00 GMT
link: <https://site.com/wp-json/>; rel="https://api.w.org/"
link: <https://site.com/wp-json/wp/v2/pages/714>; rel="alternate"; type="application/json"
link: <https://site.com/>; rel=shortlink
pragma: no-cache
server: nginx
strict-transport-security: max-age=31536000
vary: Accept-Encoding
I also got this errors on sitelogs (maybe is not related but i am surprised because wordpress never used such file favicon.ico):
[crit] 18975#0: *56 connect() to unix:/tmp/php-cgi-73.sock failed (2: No such file or directory) while connecting to upstream, client: 77.230.69.14, server: site.com, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-73.sock:", host: "site.com"
[crit] 18975#0: *56 connect() to unix:/tmp/php-cgi-73.sock failed (2: No such file or directory) while connecting to upstream, client: 77.230.69.14, server: site.com, request: "GET /favicon.ico HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-73.sock:", host: "site.com", referrer: "https://site.com/"
2021/12/15 12:21:34 [crit] 19126#0: *21 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 35.203.251.57, server: 0.0.0.0:443
[error] 19084#0: *7 open() "/www/wwwroot/site.com/favicon.ico" failed (2: No such file or directory), client: 77.230.69.14, server: trabajodeporte.com, request: "GET /favicon.ico HTTP/2.0", host: "site.com", referrer: "https://site.com/"
Fix please?
fast-cgi cache is the important page cache method and aaPanel author even did not give the solution for two or more websites on this thread. Poor aaPanel. I will stop to try aaPanel here.
aaPanel_Jose This post was very helpful. I did some modifications and finally managed to set fastcgi on multiple websites.
Is this still valid for aaPanel version 6.8.22, nginx 1.21.4, and PHP 7.4 ?
ccasalicchio
yes it works, you have to replace from 73 to 74 in above examples.
aaPanel_Jose What is benefit of FastCGI cache?
is the Nginx Helper wp plugin necessary for fastcgi cache to work or it's just for the purge cache to work? because I do it manually anyway
Hi, I did follow your instruction and it worked, thanks for the tutorial.
But, I got a problem that is when I enable "Anti-XSS attack (Base directory limit)(open_basedir)" feature for the website, I can't do "Purge Cache" from the Nginx-Helper plugin, there was no-showed error, I clicked on it, and I check the cache folder in the server, the cached files were still there.
"Purge Cache" works well when I disable "Anti-XSS attack (Base directory limit)(open_basedir)".
So, is there any solution to that? I want to enable "Anti-XSS attack (Base directory limit)(open_basedir)"
This doesn't work if Wordpress is in a subdirectory, what should be modified for it to work?
dattrinh
Hello, try to add the relevant directory to the .uer.ini file
aaPanel_Kern Thank you! it works well now.
I want to share my work here.
I did update the file: /www/server# vim panel/class/panelSite.py
As you can see in the picture, I added /dev/shm, /dev/shm is my cache path.
Do not forget to restart the panel to apply your change.
@aaPanel_Kern any advices to make the fastcgi cache works if wordpress is running in a subdirectory?
Josdansd
The same, except that the site data storage directory is different
aaPanel_Kern But I followed the same steps and I'm getting a 502 Nginx Error
Josdansd
It is recommended that you use Wordpress deploy for deployment and enable caching
Tried so many times, when we use Fast CGI cache with NGINX helper security headers are not detected.
aaP_hareeshnarayan1982
Hello, it is recommended to modify the configuration and add it yourself
I had added the headers in site config. Here are the headers that i added in site config. Without NGINX cache (NGINX Helper) its working fine.
add_header X-XSS-Protection "1; mode=block";
add_header X-Frame-Options "ALLOW-FROM *";
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin";
add_header Permissions-Policy "geolocation=(),midi=(),sync-xhr=(),microphone=(),camera=(),magnetometer=(),gyroscope=(),fullscreen=(self),payment=()";
add_header Content-Security-Policy "upgrade-insecure-requests";
Permission, referral and content security is what having problems.
aaP_hareeshnarayan1982
look confing PHP conf