Compdigitec Labs

« | Home | »

Setting up a ProFTPd port-based VirtualHost

By admin | February 13, 2011

ProFTPd is a very powerful FTP server software that is most commonly used on Linux servers to provide a FTP service to the public, Intranet or Web Services. ProFTPd, much like its HTTP counterpart, Apache, contains the ability to host multiple different services on one physical computer by using “Virtual Hosts”, which makes it appear as it were multiple hosts hosting different content. Unfortunately, FTP does not support named-based virtual hosting like HTTP does, so to allow customers/clients to be able to FTP you must use a different port.

Procedure

  1. Open up your ProFTPd configuration file (by default it is /etc/proftpd.conf) using your favourite text editor:
    sudo nano -w /etc/proftpd.conf
  2. Add a VirtualHost. The following snippet sets up a “virtual” server on Port 3003 for all bound IP addresses (IPv6 and IPv4). You can change the 3003 to the port you want to host, change the ServerName to a useful description of the host and DefaultRoot to the root of the FTP.
    <VirtualHost ::0.0.0.0>
    	Port 3003
    	Umask 022
    	ServerName "VirtualHost FTP"
    	DefaultRoot /home/www/customer3003
    </VirtualHost>
    
  3. If you do not want IPv6 support or it gives you problems on your specific host, then you can bind it to all IPv4 addresses on Port 3003 (same as above otherwise):
    <VirtualHost 0.0.0.0>
    	Port 3003
    	Umask 022
    	ServerName "VirtualHost FTP"
    	DefaultRoot /home/www/customer3003
    </VirtualHost>
    
  4. If you want, you can also modify it to bind to only certain ports to the specified port. When you are comfortable with your configuration, save the file and exit.
  5. Reload the FTP server and connect away:
    sudo /etc/init.d/proftpd restart

What did not work

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: Linux | 8 Comments »

8 Responses to “Setting up a ProFTPd port-based VirtualHost”

  1. pg168 Says:
    March 26th, 2025 at 20:10

    … [Trackback]

    […] Read More on to that Topic: compdigitec.com/labs/2011/02/13/setting-up-a-proftpd-port-based-virtualhost/ […]

  2. แทงบอลกินค่าน้ำ คืออะไร? Says:
    March 29th, 2025 at 12:30

    … [Trackback]

    […] Here you will find 6586 additional Information to that Topic: compdigitec.com/labs/2011/02/13/setting-up-a-proftpd-port-based-virtualhost/ […]

  3. ปั้มวิวไลฟ์สด Says:
    April 4th, 2025 at 03:41

    … [Trackback]

    […] Here you will find 25699 more Information to that Topic: compdigitec.com/labs/2011/02/13/setting-up-a-proftpd-port-based-virtualhost/ […]

  4. fortune rabbit Says:
    April 10th, 2025 at 16:23

    … [Trackback]

    […] Read More Info here to that Topic: compdigitec.com/labs/2011/02/13/setting-up-a-proftpd-port-based-virtualhost/ […]

  5. บาคาร่า ufa11k Says:
    April 11th, 2025 at 06:41

    … [Trackback]

    […] Here you will find 85215 more Info on that Topic: compdigitec.com/labs/2011/02/13/setting-up-a-proftpd-port-based-virtualhost/ […]

  6. เกมยอดนิยมที่สามารถเล่นได้บน Godzilla 88 Says:
    April 16th, 2025 at 18:32

    … [Trackback]

    […] Find More on on that Topic: compdigitec.com/labs/2011/02/13/setting-up-a-proftpd-port-based-virtualhost/ […]

  7. สล็อตเว็บตรงไม่ผ่านเอเย่นต์ไม่มีขั้นต่ำ Says:
    April 24th, 2025 at 19:14

    … [Trackback]

    […] Find More on that Topic: compdigitec.com/labs/2011/02/13/setting-up-a-proftpd-port-based-virtualhost/ […]

  8. ufa wallet 789 Says:
    April 26th, 2025 at 18:59

    … [Trackback]

    […] Here you will find 28802 more Info to that Topic: compdigitec.com/labs/2011/02/13/setting-up-a-proftpd-port-based-virtualhost/ […]

Comments