Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /usr/share/doc/proftpd-doc/howto/ drwxr-xr-x | |
| Viewing file: Select action/file-type: ProFTPD: Memcache
What is Memcache?
How Can Memcache Be Useful for ProFTPD?
Enabling Memcache Support for ProFTPD
The
There are other modules which make use of memcached support when available,
such as
$ ./configure --enable-memcache \
--with-modules=...:mod_tls_memcache:... \
--with-includes=/path/to/libmemcached/include \
--with-libraries=/path/to/libmemcached/lib
Configuring
<IfModule mod_memcache.c>
# Enable mod_memcache
MemcacheEngine on
# Tell mod_memcache where to log its messages
MemcacheLog /path/to/proftpd/memcache.log
# Tell mod_memcache where to find the memcached servers
MemcacheServers 192.168.0.10:11211 192.168.0.11:11211
</IfModule>
If you wish to see more detailed logging, at least while you are setting
up your memcached servers for ProFTPD, you can enable trace logging for the
memcache trace channel using e.g.:
TraceLog /path/to/proftpd/trace.log Trace DEFAULT:10 memcache:20
Using Memcache for Shared Storage
Currently, only two modules can take advantage of
First, let us examine
<IfModule mod_ban.c>
BanEngine on
# ...other mod_ban directives...
# Tell mod_ban to store its ban lists using memcache
BanCache memcache
</IfModule>
With this, mod_ban will use memcached (as well as
shared memory) for reading/writing its ban lists. And this, in turn, means
that other proftpd servers' mod_ban modules can see
those bans, and reject the badly behaved clients across the pool/cluster.
The
To use
<IfModule mod_tls.c>
TLSEngine on
# ...other mod_tls directives...
<IfModule mod_tls_memcache.c>
# Tell mod_tls to cache sessions using memcached
TLSSessionCache memcache:
</IfModule>
</IfModule>
That's it. The mod_tls module now knows to give the SSL/TLS
session data to mod_tls_memcache, and mod_tls_memcache
knows how to talk to the memcached servers using
mod_memcache.
Frequently Asked Questions
Question: Can I use
Why not? Many HTTP transfers are for dynamically generated pages; the cost of
generating each page is expensive, and the generated content may not change
that frequently (relative to the rate of requests). FTP transfers, by contrast,
are for static files; FTP servers do not (usually) dynamically generate
the bytes of the files being downloaded. The cost of reading files from disk
is probably less than reading files from
Now the above may not be true in all cases -- there may be FTP servers
serving files from network-mounted filesystems (e.g. NFS, CIFS
et al). And for these very specific cases, having a cache of frequently
access files on closer storage such as local disk (or
Question: Why do I see the following error when
mod_tls_memcache/0.1: notice: unable to register 'memcache' SSL session cache: Memcache support not enabledAnswer: This message means that your proftpd server has mod_tls_memcache built and
loaded, but your proftpd server was not built
with memcache support (i.e. the --enable-memcache configure
option was not used when compiling proftpd).
The above is not a fatal or worrisome error; it is merely pointing out that some of your modules want to use a feature that was not enabled.
© Copyright 2017 The ProFTPD Project All Rights Reserved |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.012 ]-- |