Pages : 1
#1 Le 16/10/2012, à 11:03
- leomat
Proftpd - VirtualHost
Bonjour tout le monde,
Je viens vous trouver pour m'éclairer dans la configuration de proftpd.
Ce que je cherche à faire, c'est le configurer afin d'avoir accès à différents dossiers en fonction du nom de domaine.
Voici par exemple:
En me connectant en FTP au sous-domaine xxx.mydomain.com, je me retrouve dans le dossier /var/www/xxx
En me connectant en FTP au sous-domaine yyy.mydomain.com, je me retrouve dans le dossier /var/www/yyy
Je précise que ces sous-domaines sont configurés en dynhost par OVH, et que mon routeur est bien configuré (j'arrive à me connecter au ftp, mais la redirection selon le nom de domaine ne fonctionne pas).
Voici mon fichier de config:
# Includes DSO modules
Include /etc/proftpd/modules.conf
Include /etc/proftpd/virtuals.conf
# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6 off
# If set on you can experience a longer connection delay in many cases.
IdentLookups off
UseReverseDNS off
ServerName "Server"
ServerType standalone
DeferWelcome off
MultilineRFC2228 on
DefaultServer off
ShowSymlinks off
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
DisplayLogin welcome.msg
DisplayChdir .message true
ListOptions "-l"
DenyFilter \*.*/
# Use this to jail all users in their homes
DefaultRoot ~/www
AllowStoreRestart on
AllowRetrieveRestart on
RootLogin on
# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
# RequireValidShell off
# Port 21 is the standard FTP port.
Port 21
# 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
# Set the user and group that the server normally runs at.
User proftpd
Group nogroup
# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022
Et voici mon fichier Virtuals.conf qui, je pense, doit être mauvais:
<VirtualHost xxx.mydomain.com>
ServerAdmin myemail@gmail.com
ServerName "Folder1"
TransferLog /var/log/xxx
MaxLoginAttempts 3
DefaultRoot /var/www/xxx
AllowOverwrite yes
</VirtualHost>
<VirtualHost yyy.mydomain.com>
ServerAdmin myemail@gmail.com
ServerName "Folder2"
TransferLog /var/log/yyy
MaxLoginAttempts 3
DefaultRoot /var/www/yyy
AllowOverwrite yes
</VirtualHost>
Au cas où, voici mon fichiers /etc/hosts:
127.0.0.1 localhost
127.0.1.1 server
192.168.0.6 xxx.mydomain.com
192.168.0.6 yyy.mydomain.com
Auriez-vous une idée du problème? J'ai manqué quelque chose?
Merci!
Hors ligne
Pages : 1