proftp 1.2.9的基本安装手册( 七 )



8. Can I run more that one VirtualHost on a single IP?

No, or at least not in the HTTP/1.1 manner of virtual hosting. This is an inbuilt limitation of the current FTP RFC., unlike

the HTTP/1.1 spec there is no mechanism comparable to the "Host: foo.bar.com" HTTP header for specifying which host the

connection is for. Therefore the only method for determining which VirtualHost the connection is destined for is by the

destination IP.

The one exception to this is if you host multiple servers on the same IP but using different ports, however this requires

that the connecting client uses a non-standard port and therefore is probably not a good solution for mass hosting.

Is there anything in the pipeline to fix this?
There is a draft standard http://search.ietf.org/internet-drafts/draft-ietf-ftpext-mlst-12.txtwith the IETF which extends

and improves on the FTP specification including support for a HOST command. However given that the IP crunch is coming from

websites and not virtual ftp servers this is unlikely to be pushed through any time soon.

9. How do I run ProFTPD from inetd?

Find the line in /etc/inetd.conf that looks something like this:

ftp stream tcp nowait root in.ftpd in.ftpd

Replace it with:

ftp stream tcp nowait root in.proftpd in.proftpd

Then, find your inetd process in the process listing and send it the SIGHUP signal so that it will rehash and reconfigure

itself. You may also need to add in.ProFTPD to hosts.allow on your system.

10. Can I use tcp-wrappers with ProFTPD?

Yup. Although ProFTPD has built-in IP access control (see the Deny and Allow directives), many admins choose to consolidate

IP access control in one place via in.tcpd. Just configure ProFTPD to run from inetd as any other tcp-wrapper wrapped daemon

and add the appropriate lines to hosts.allow/deny files.

If running ProFTPD in standalone mode, mod_wrap can be used to direct the server to use the normal hosts.allow/deny files.

11. Can I run an FTP server on a non-standard port?

Yes. Use a block with your machine"s FQDN (Fully Qualified Domain Name) or IP address, and a Port directive

inside the block. For example, if your host is named "myhost.mydomain.com" and you want to run an additional

FTP server on port 2001, you would:

...

Port 2001
...


12. Can control upload/download ratios?

Yes the mod_ratio module provides for doing just this.

The ratio directives take four numbers: file ratio, initial file credit, byte ratio, and initial byte credit. Setting either

ratio to 0 disables that check.

The directives are HostRatio (matches FQDN, wildcards allowed), AnonRatio (matches password entered at login), UserRatio

(accepts "*" for "any user"), and GroupRatio.

Ratios on # enable module
UserRatio ftp 0 0 0 0
HostRatio master.debian.org 0 0 0 0 # leech access (default)
GroupRatio proftpd 100 10 5 100000 # 100:1 files, 10 file cred 5:1 bytes, 100k byte cred
AnonRatio billg@microsoft.com1 0 1 0 # 1:1 ratio, no credits
UserRatio * 5 5 5 50000 # special default case

This example is for someone who (1) has downloaded 1 file of 82k, (2) has uploaded nothing, (3) has a ratio of 5:1 files and

5:1 bytes, (4) has 4 files and 17k credit remaining, and (5) is now changing directory to /art/nudes/young/carla. The initial

credit, not shown, was 5 files and 100k (UserRatio * 5 5 5 100000).

Version 2.0 and above of this module integrate with mod_sql.

Limitations of mod_ratio
It appears that the ratio limits in mod_ratio are only maintained on a per session basis and there is no ongoing tracking of

usage.

13. Slow logins

This is probably caused by a firewall or DNS timeout. By default ProFTPD will try to do both DNS and ident lookups against

推荐阅读