Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 095986564b2763b807bd187f962e2354 > files > 1

apache-mod_ftp-0.9.6-0.1mdv2010.0.i586.rpm

<IfDefine HAVE_FTP>
    <IfModule !mod_ftp.c>
	LoadModule ftp_module		extramodules/mod_ftp.so
    </IfModule>
</IfDefine>

<IfModule mod_ftp.c>

#########################################################################
# Sample configuration file for the FTP protocol module.
#########################################################################

#########################################################################
# Define the formats for the command log and transfer log
#########################################################################
#
<IfModule mod_log_config.c>
#
# The command log has the format "user [x.x.x.x] command"
# For example: "anonymous [127.0.0.1] CWD /incoming"
#
LogFormat    "%u [%a] %r" command_log_fmt

#
# The transfer log
#
LogFormat    "%{%b %e %H:%M:%S %Y}t %T %a %B %U %M %F %d %W %u %S %Z %Y" transfer_log_fmt
#             1                     2  3  4  5  6  7  8  9  10 11 12 13
#
# What this actually means:
# 1 current time in the form DDD MMM dd hh:mm:ss YYYY
# 2 transfer time in seconds (could do milliseconds, but wu-ftp uses seconds)
# 3 remote host name
# 4 file size in bytes
# 5 name of file
# 6 transfer type (a=ascii b=binary)
# 7 special action flags (concatenated as needed)
#                        C - file was compressed
#                        U - file was uncompressed
#                        T - file was tarred
#                        _ - no action taken
# 8 file was sent to user (o=outgoing i=incoming)
# 9 accessed anonymously (r=real a=anonymous, g=guest)
# 10 username
# 11 service name ('ftp', other)
# 12 authentication method (bitmask) (0=none 1=rfc931 auth)
# 13 authenticated user id (if available, '*' otherwise)
#
</IfModule>

#########################################################################
# Basic setup
#########################################################################

# Tell Apache which port it should listen to.
Listen 2121 ftp
AcceptFilter ftp none

# On Apache 2.0, comment out the above, and uncomment the line below,
# The Listen's protocol argument and AcceptFilter directive are both
# new to Apache 2.2
#
#Listen 2121

# Uncomment these lines for SSL support.  Also see
# directives in the VirtualHost context.
#
# SSLPassPhraseDialog     builtin
# SSLSessionCache         "dbm:/var/cache/httpd/mod_ssl/ssl_scache"
# SSLSessionCache         "shmcb:/var/cache/httpd/mod_ssl/ssl_scache(512000)"
# SSLSessionCacheTimeout  300
# SSLMutex                "file:/var/cache/httpd/mod_ssl/mod_ssl_mutex"

# Setup the FTP virtualhost
<VirtualHost _default_:2121>

# Setup the ServerAdmin and DocumentRoot
ServerAdmin  root@localhost
DocumentRoot "/var/www/ftp"

# Tell Apache we want to serve FTP on this VirtualHost
FTP On

#########################################################################
# Access Control
#########################################################################

# For the purposes of logging in, authentication is check within Apache
# on the root of the file system.  This means that if you want to restrict
# logins to the FTP server, you will need to configure Authentication for
# <Directory "/var/www/ftp">.  See below for examples.

# File based authentication.
# Must use htpasswd to create the authentication file.
#
#<Directory "/var/www/ftp">
#    AuthType basic
#    AuthUserFile "/etc/httpd/conf/htpasswd.ftpusers"
#    AuthName "FTP Authentication"
#    require valid-user
#</Directory>

#
# Anonymous ftp access.
#
#<Directory "/var/www/ftp">
#    AuthName "Use 'anonymous' and email address for guest entry"
#    AuthType basic
#
#    Anonymous anonymous guest
#    Anonymous_MustGiveEmail on
#    Anonymous_LogEmail on
#    
#    # More anonymous options that are not necessarily needed.
#    Anonymous_VerifyEmail off
#    Anonymous_NoUserId off
#    Anonymous_Authoritative off
#
#    # Require that the user is valid
#    require valid-user
#
#</Directory>

#
# Deny all users from a protected directory.
# 
#<Directory "/var/www/ftp/protected">
#    deny from all
#</Directory>

#########################################################################
# Enabling write commands.
#########################################################################
#
# Only allow write access to /incoming
# <Directory "/var/www/ftp">
#     <Limit MKD RMD STOR DELE RNFR>
#         Order deny,allow
#         Deny from all
#     </Limit>
# </Directory>
#
# <Directory "/var/www/ftp/incoming">
#     <LimitExcept MKD RMD STOR DELE RNFR>
#         Order deny,allow
#         Allow from all
#     </LimitExcept>
# </Directory>
#

#########################################################################
# Basic FTP directives
##########################################################################

# The FTPUmask directive tells the server what permissions to give a
# file when it is created.  The default is 0022.
# FTPUmask             022

# The FTPTimeoutLogin directive sets the amount of time a user has
# to send a username to the server.  If the username is not sent in
# this amount of time, the user is disconnected.
# FTPTimeoutLogin      120

# The FTPTimeoutIdle directive sets the amount of time allowed between
# commands sent by the client.  If no commands are sent in this amount
# of time, the user is disconnected.
# FTPTimeoutIdle       600

# The FTPTimeoutData directive sets the timeout on data transfers. If
# a no data is sent to the client in this amount of time, the data
# connection is closed.
# FTPTimeoutData       300

# The maximum number of login attempts before the connection is closed.
# FTPMaxLoginAttempts    3

#########################################################################
# Logging
#########################################################################

# Setup the error_log for this virtualhost.
ErrorLog     "/var/log/httpd/ftp_error_log"

# Log the commands of users logged in anonymously.
# SetEnvIf remote_user anonymous do_command_log
# CustomLog "/var/log/httpd/ftp_command_log" command_log_fmt env=do_command_log
#
# Log the command of all users
# CustomLog "/var/log/httpd/ftp_command_log" command_log_fmt

# The transfer log.
#
# CustomLog "/var/log/httpd/ftp_transfer_log" transfer_log_fmt env=do_transfer_log

#########################################################################
# SSL Support
#########################################################################

#
# Adding SSL support to the FTP module is similar to adding support for
# SSL to the HTTP module.

# SSLEngine on
# SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
# SSLCertificateFile "/etc/pki/tls/certs/localhost.crt"
# SSLCertificateKeyFile "/etc/pki/tls/private/localhost.key"

#
# Should clients be forced to connect securely?
# FTPImplicitSSL On

</VirtualHost>

</IfModule>