荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: plain.bbs@bbs.cqupt.edu.cn (三缄其口), 信区: Linux
标  题: proftp虚拟服务器配置
发信站: 幽幽黄桷兰 (Wed Mar 17 13:57:48 2004)
转信站: SZU!news.szu.edu.cn!news.feeling.smth.org!news.uestc.edu.cn!CQUPT

# This sample configuration file illustrates creating two
# virtual servers, and associated anonymous logins.

ServerName          "ProFTPD"
ServerType          inetd

# Port 21 is the standard FTP port.
Port                21

# Global creates a "global" configuration that is shared by the
# main server and all virtualhosts.

<Global>
  # Umask 022 is a good standard umask to prevent new dirs and files
  # from being group and world writable.
  Umask             022
</Global>

# Set the user and group that the server normally runs at.
User                nobody
Group               nogroup

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances                    30

# Maximum seconds a data connection may "stall"
TimeoutStalled          300

# First virtual server
<VirtualHost ftp.virtual.com>
  ServerName            "Virtual.com's FTP Server"

  MaxClients            10
  MaxLoginAttempts      1

  # DeferWelcome prevents proftpd from displaying the servername
  # until a client has authenticated.
  DeferWelcome          on

  # Limit normal user logins, because we only want to allow
  # guest logins.
  <Limit LOGIN>
    DenyAll
  </Limit>

  # Next, create a "guest" account (which could be used
  # by a customer to allow private access to their web site, etc)
  <Anonymous ~cust1>
    User            cust1
    Group           cust1
    AnonRequirePassword     on

    <Limit LOGIN>
      AllowAll
    </Limit>

    HideUser            root
    HideGroup           root

    # A private directory that we don't want the user getting in to.
    <Directory logs>
      <Limit READ WRITE DIRS>
        DenyAll
      </Limit>
    </Directory>
  </Anonymous>
</VirtualHost>

# Another virtual server, this one running on our primary address,
# but on port 4000.  The only access is to a single anonymous login.
<VirtualHost our.ip.address>
  ServerName            "Our private FTP server"
  Port              4000
  Umask             027

  <Limit LOGIN>
    DenyAll
  </Limit>

  <Anonymous /usr/local/ftp/virtual/a_customer>
    User            ftp
    Group           ftp
    UserAlias           anonymous ftp

    <Limit LOGIN>
      AllowAll
    </Limit>

    <Limit WRITE>
      DenyAll
    </Limit>

    <Directory incoming>
      <Limit WRITE>
        AllowAll
      </Limit>
    </Directory>
  </Anonymous>
</VirtualHost>
--
做人要厚道
※ 来源:·幽幽黄桷兰 bbs.cqupt.edu.cn·[FROM: www.coiwin.com]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店