VirtuBox / nginx-ee

Automated Nginx compilation with HTTP/3 and additional modules support. Compatible with WordOps, EasyEngine & Plesk
https://virtubox.github.io/nginx-ee/
MIT License
198 stars 58 forks source link

nginx: [emerg] unknown "srcache_fetch_status" variable dynamic modules installation. #114

Open Chathu07 opened 2 years ago

Chathu07 commented 2 years ago

Attach the following commands output bash <(wget -qO - vtb.cx/nginx-ee || curl -sL vtb.cx/nginx-ee) --dynamic --cron

Describe the bug A clear and concise description of what the bug is.

I have WordOps stack. When I use VirtuBox dynamic installation it generates nginx: [emerg] unknown "srcache_fetch_status" variable.

nginx -t
nginx: [emerg] unknown "srcache_fetch_status" variable
nginx: configuration file /etc/nginx/nginx.conf test failed

Error generate redis.conf file.

log_format rt_cache_redis '$remote_addr $upstream_response_time $srcache_fetch_status [$time_local] '
'$http_host "$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
tinof commented 1 year ago

This module is missing from Nginx -> srcache-nginx-module

You need to comment out "srcache" related lines on your php*.conf and remove '$srcache_fetch_status' from 'redis.conf'

/etc/nginx# grep -r "srcache_fetch_status" .
./conf.d/redis.conf:log_format rt_cache_redis '$remote_addr $upstream_response_time $srcache_fetch_status [$time_local] '
./common/redis-php80.conf:  more_set_headers 'X-SRCache-Fetch-Status $srcache_fetch_status';
./common/redis-php73.conf:  more_set_headers 'X-SRCache-Fetch-Status $srcache_fetch_status';
./common/redis-php72.conf:  more_set_headers 'X-SRCache-Fetch-Status $srcache_fetch_status';
./common/redis-php74.conf:  more_set_headers 'X-SRCache-Fetch-Status $srcache_fetch_status';
./common/redis-php82.conf:  more_set_headers 'X-SRCache-Fetch-Status $srcache_fetch_status';
./common/redis-php81.conf:  more_set_headers 'X-SRCache-Fetch-Status $srcache_fetch_status';