Using Apache As an FTP Server


Listen 10.0.0.1:21 <VirtualHost 10.0.0.1:21> FTP On DocumentRoot /usr/local/apache/ftpdocs ErrorLog /usr/local/apache/logs/ftp_error_log <Location />     AuthName "FTP"     AuthType basic     AuthUserFile /usr/local/apache/conf/htusers     Require valid-user </Location> </VirtualHost>


As mentioned earlier in this chapter, Apache 2 is more than a web serverit is a generic server framework. By building a server on top of Apache, a developer can take advantage of a solid, portable infrastructure; an extension mechanism; and the possibility of using many other third-party modules that exist for Apache. That is the case for mod_ftp, which adds FTP capabilities to Apache. Most of the configuration settings, such as authentication directives, are shared with the rest of the server. You can enable FTP support simply by adding FTP On inside the appropriate Virtual Host section. Additional directives, such as FTPUmask, FTPTimeoutLogin, FTPBannerMessage, and FTPMaxLoginAttempts, allow you to configure features common with other FTP servers.

At the time of this writing, mod_ftp is in the process of becoming an official ASF project and can be downloaded from http://incubator.apache.org/projects/mod_ftp.html.




Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net