Apache virtual host problem, mod_ftp

Discussion in 'Apache' started by lunter, Mar 9, 2010.

  1. #1
    Hi, I have big problem with login to virtualhost by user.

    When I login as
    login: test
    password: test@
    ...Apache select first VirtualHost, not second, why?

    ## ftpd.conf
    
    <IfModule mod_log_config.c>
     LogFormat    "%u [%a] %r" command_log_fmt
     LogFormat    "%{%b %e %H:%M:%S %Y}t %T %a %B %U %M %F %d %W %u %S %Z %Y" transfer_log_fmt
    </IfModule>
    Listen 21
    FTPOptions NoUTF8Feature VirtualHostByUser
    NameVirtualHost *:21
    <VirtualHost *:21>
     FTP On
     ServerName lunter@127.0.0.1
     DocumentRoot "c:/ftpdocs/lunter"
     <Directory "c:/ftpdocs/lunter">
         AuthType basic
         AuthUserFile "conf/htpasswd_lunter.users"
         AuthName "FTP Authentication"
         require valid-user
         Allow from all
     </Directory>
    </VirtualHost>
    <VirtualHost *:21>
     FTP On
     ServerName test@127.0.0.1
     DocumentRoot "c:/ftpdocs/test"
     <Directory "c:/ftpdocs/test">
         AuthType basic
         AuthUserFile "conf/htpasswd_test.users"
         AuthName "FTP Authentication"
         require valid-user
         Allow from all
     </Directory>
    </VirtualHost>
    
    Code (markup):
    ## htpasswd_lunter.users
    
    lunter:lunter@
     
    Code (markup):
    ##htpasswd_test.users:
    
    test:test@
    
    Code (markup):
     
    lunter, Mar 9, 2010 IP