Virtuelle Hosts mit proftpd

From: Christian Weerts (christian@familie-weerts.de)
Date: Tue Aug 26 2003 - 20:21:36 CEST


Moin,

ich möchte mehrere Virtuelle Hosts unter proftpd anlegen. Dazu habe ich
folgende Konfiguration erstellt:

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

ServerName "Blafasel"
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

#
# Logging options
#
TransferLog /var/log/proftpd.xferlog
SystemLog /var/log/proftpd.system

# Some logging formats
#
LogFormat default "%h %l %u %t \"%r\" %s %b"
LogFormat auth "%v [%P] %h %t \"%r\" %s"
LogFormat write "%h %l %u %t \"%r\" %s %b"

# Log file/dir access
ExtendedLog /var/log/proftpd.access_log WRITE,READ write

# Record all logins
ExtendedLog /var/log/proftpd.auth_log AUTH auth
# Paranoia logging level....
ExtendedLog /var/log/proftpd.paranoid_log ALL default

# 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 foo-bar.de>
       ServerName "foo-bar.de"
       MaxClients 1
       MaxLoginAttempts 1
       DeferWelcome on

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

# Next, create a account
      <Anonymous /home/customers/foo-bar.de>
      User foo
      Group customer
      AnonRequirePassword on
      <Limit LOGIN>
       AllowAll
      </Limit>

      HideUser root
      HideGroup root
      RequireValidShell off

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

# Second virtual server
<VirtualHost boing-bum.de>
        ServerName "boing-bum.de"
        MaxClients 1
        MaxLoginAttempts 1

        DeferWelcome on

        <Limit LOGIN>
        DenyAll
        </Limit>

        <Anonymous /home/customers/boing-bum.de>
                User boing
                Group customer
                AnonRequirePassword on
                <Limit LOGIN>
                AllowAll
                </Limit>
                HideUser root
                HideGroup root
                RequireValidShell off

                <Directory ftplogs>
                <Limit READ WRITE DIRS>
                DenyAll
                </Limit>
                </Directory>
        </Anonymous>
</Virtualhost>

Soweit sogut. Nur kann ich mich nur unter der Adresse foo-bar.de einloggen.
Beim einloggen unter boing-bum.de bekomme ich folgende Meldung ins Log:

Aug 26 19:53:17 serve proftpd[17333] icke.de: cannot bind 123.123.123.123:21
 to server 'boing-bum.de', already bound to 'foo-bar.de'.

Hat jemand einen Tipp, und kann mir sagen wo ich einen Fehler gemacht habe?

Gruss,
        Christian

-- 
[X] <-- Nail here for new Monitor!


This archive was generated by hypermail 2.1.7 : Tue Aug 26 2003 - 20:21:42 CEST