1

I need a FTP server on linux that supports name-based Virtual Hosting.

Based on proftpd documents, this package support name-base and ip-base virtual hosting. In real I want define two virtual server on a single ip address. Then all user login to the ftp server based on domain name to special directory.

For example we have two site with names x.y and h.n, and we have ftp user.

My config files are in the following lines:

/etc/proftpd/proftpd.conf

.....
include /etc/proftpd/conf.d/h.conf
include /etc/proftpd/conf.d/x.conf

/etc/proftpd/conf.d/x.conf

<VirtualHost x.y>
MaxLoginAttempts        3
RequireValidShell       no
DefaultRoot             /home/x/
</VirtualHost>

/etc/proftpd/conf.d/h.conf

<VirtualHost h.y>
MaxLoginAttempts        3
RequireValidShell       no
DefaultRoot             /home/h/
</VirtualHost>

With these settings when I login yo x.y or h.n, I login to the same of directory that point to the /home/h/. And if I replace two include lines in proftpd.conf with each other that first include x.conf then h.conf, after login with x.y or h.n the /home/x/ was opened for me.

  • 2
    You also need a client that supports RFC 7151 and which sends the HOST command for VirtualHosting to work correctly... – HBruijn Aug 26 '17 at 07:34

0 Answers0