Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a webserver that we are giving a consultant FTP access to. For one domain hosted on that server he needs access to a "dev" directory and for a different domain hosted on that server he needs access to a different directory. I am trying to set this up with VirtualHosts, but I am having issues. Here is the VirtualHost bit of my proftpd.conf file:

        ServerName  "Example 2"
        DefaultRoot /var/www/example2/dev
        ServerName  "Example 1"
        DefaultServer on
        DefaultRoot /var/www/example1

When I FTP to either domain I always get the first VirtualHost, even if I FTP to the second domain.

share|improve this question
up vote 1 down vote accepted

FTP dosen't work like HTTP. There is no name based virtual hosts. Only IP based. If you need same user name but different directories you can use separate TCP ports for them or more than one IP.

share|improve this answer
That's what I was starting to wonder. Thanks. – Jason Oct 10 '12 at 12:39

Note that with the advent of RFC 7151, FTP now has a HOST command for supporting true name-based virtual hosts, just as the Host header does for HTTP 1.1.

And ProFTPD implements this HOST command as of the 1.3.6rc1 release. To use it, you can either simply use DNS names in your <VirtualHost> section, like so:


Or you can explicitly alias the virtual servers as needed:


Hope this helps!

Full disclosure: I'm the author of ProFTPD.

share|improve this answer
wow wow !! Such an honor here! But seems your doc is outdated : . Anyway, I will do some more research why it is still not working for me (on webmin/ubuntu) – Pham Huy Anh May 6 at 18:47
Guys, I got this. My ProFTPD is 1.3.5, upgrade is one the way. Castaglia, you are awesome – Pham Huy Anh May 6 at 18:50
Thanks! I've just filed an issue to get that doc updated. – Castaglia May 6 at 18:57
Cool, I hope the stable release could be available soon (including ubuntu repo). SUPER DUPER! – Pham Huy Anh May 6 at 19:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.