Skip to content
Snippets Groups Projects
Commit 26838ec6 authored by Julian Pustkuchen's avatar Julian Pustkuchen Committed by Sascha Grossenbacher
Browse files

Issue #2789965 by Anybody, pucowanje, introfini, vensires: Better...

Issue #2789965 by Anybody, pucowanje, introfini, vensires: Better documentation on how to allow Socket Connections
parent 70687f63
No related branches found
No related tags found
1 merge request!34Resolve #2789965 "Allow socket connections docs"
Pipeline #256178 canceled
......@@ -36,9 +36,10 @@ Add the new instance setting:
Connect via UNIX socket
-----------------------
Just add this line to your settings.php file:
Just add these lines to your settings.php file:
$conf['redis_cache_socket'] = '/tmp/redis.sock';
$settings['redis.connection']['host'] = '/tmp/redis.sock'; // Your Redis socket
$settings['redis.connection']['port'] = 0; // For socket connections the port must be 0
Don't forget to change the path depending on your operating system and Redis
server configuration.
......
......@@ -21,6 +21,10 @@ $settings['redis.connection']['interface'] = 'Predis';
$settings['redis.connection']['host'] = '1.2.3.4'; // Your Redis instance hostname.
$settings['cache']['default'] = 'cache.backend.redis';
Or connect via socket:
$settings['redis.connection']['host'] = '/tmp/redis.sock'; // Your Redis socket
$settings['redis.connection']['port'] = 0; // For socket connections the port must be 0
To add more magic with a primary/replica setup you can use a config like this:
$settings['redis.connection']['interface'] = 'Predis'; // Use predis library.
......
......@@ -15,6 +15,10 @@ if (!InstallerKernel::installationAttempted() && extension_loaded('redis')) {
// $settings['redis.connection']['host'] = '127.0.0.1';
// $settings['redis.connection']['port'] = 6379;
// Use UNIX socket instead:
// $settings['redis.connection']['host'] = '/tmp/redis.sock'; // Your Redis socket
// $settings['redis.connection']['port'] = 0; // For socket connections the port must be 0
// Customize used interface.
// $settings['redis.connection']['interface'] = 'PhpRedis';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment