⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 文件传输协议linux 下vsftpd2.1.0.tar.gz
💻
字号:
This example shows how you might set up virtual hosts. Virtual hosting iswhere different clients access your machine on different IP addresses (virtualIPs) and get redirected to different ftp sites.For example, if your machine responds to two IPs - 127.0.0.1 and 127.0.0.2,you could have the two different IPs represent two totally different FTP sites.For this example, we are going to build on the "INTERNET_SITE" example.Step 1) Set up a virtual IP address.ifconfig eth0:1 192.168.1.10 up(the standard IP address is 192.168.1.2)(note - this isn't quite complete, the route for local connects hasn't beenadded, but it will do for now)Step 2) Create a user / location for the new virtual site.useradd -d /var/ftp_site2 ftp_site2chown root.root /var/ftp_site2chmod a+rx /var/ftp_site2umask 022mkdir /var/ftp_site2/pubecho "test" > /var/ftp_site2/pub/contentStep 3) Modify the existing site to respond to the primary IP.Edit /etc/xinetd.d/vsftpd, and add the config line:bind = 192.168.1.2Step 4) Create the new site, responding on the virtual IP.cp /etc/xinetd.d/vsftpd /etc/xinetd.d/vsftpd2Edit vsftpd2, and change- The bind line to refer to the IP address 192.168.1.10- Add the lineserver_args = /etc/vsftpd_site2.confThis launches this FTP site with a different vsftpd configuration file.cp /etc/vsftpd.conf /etc/vsftpd_site2.confAdd two lines:ftp_username=ftp_site2ftpd_banner=This is the alternative FTP site.Step 5) Restart xinetd and test!/etc/rc.d/init.d/xinetd restart[chris@localhost vsftpd]$ ftp 192.168.1.2Connected to 192.168.1.2 (192.168.1.2).220 ready, dude (vsFTPd 1.1.0: beat me, break me)Name (192.168.1.2:chris): [chris@localhost vsftpd]$[chris@localhost vsftpd]$ ftp 192.168.1.2Connected to 192.168.1.2 (192.168.1.2).220 ready, dude (vsFTPd 1.1.0: beat me, break me)Name (192.168.1.2:chris):530 This FTP server is anonymous only.Login failed.ftp> quit221 Goodbye.[chris@localhost vsftpd]$ ftp 192.168.1.10Connected to 192.168.1.10 (192.168.1.10).220 This is the alternative FTP site.Name (192.168.1.10:chris):530 This FTP server is anonymous only.Login failed.ftp>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -