Now i need install package memcached for PHP 7.3 on Ubuntu 18.4
I have server nginx, Yii2 framework and server block, but it is not work.
How can i do this ?
server {
listen 80;
server_name dev.advanced.ru;
set $base_root /www/dev.advanced.ru;
root $base_root;
error_log /var/log/nginx/advanced.local.error.log warn;
access_log /var/log/nginx/advanced.local.access.log main;
charset UTF-8;
index index.php index.html;
location / {
root $base_root/frontend/web;
set $memcached_key "$uri?$args";
memcached_pass 127.0.0.1:11211;
error_page 404 502 504 = @fallback;
try_files $uri $uri/ /frontend/web/index.php$is_args$args;
location ~ ^/assets/.+\.php(/|$) {
deny all;
}
}
location /admin {
alias $base_root/backend/web/;
location = /admin {
try_files $uri /backend/web/index.php$is_args$args;
}
try_files $uri $uri/ /backend/web/index.php$is_args$args;
location ~ ^/admin/assets/.+\.php(/|$) {
deny all;
}
}
location ~ ^/.+\.php(/|$) {
rewrite (?!^/((frontend|backend)/web|admin))^ /frontend/web$uri break;
rewrite (?!^/backend/web)^/admin(/.+)$ /backend/web$1 break;
fastcgi_pass 127.0.0.1:9000; # proxy requests to a TCP socket
#fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
try_files $fastcgi_script_name =404;
}
location ~ /\. {
deny all;
}
location @fallback {
proxy_pass http://admin;
}
}
have you successfully installed PHP Memcached module on your system ? If no:
Also, please remember to restart the Apache service once everything if installed/updated
Requirements
Setup
Enable
Verify