教程中国
PHOTOSHOP CS9.0中文版 MAYA 8.5 FOR WINDOWS Corel Painter v9.0 Flash MX2004 中文版 Illustrator cs2 中文版
VC++6.0含sp6 中英文版 VB6.0 +sp6 简体中文版 Borland Delphi 7汉化版 MSDN for vb6.0中文版 Visual Studio 2005简体
教程中国下属 文件存储共享专家BIBIDU.COM 提供大型软件,教材,源码,电影,音乐,图书等下载 更多精品请点此进入
  您目前所在位置: 教程中国 >> Oracle >> 备份恢复 >> vsftpd-1.1.3配制实例之四:VIRTUAL_HOSTS RSS订阅
vsftpd-1.1.3配制实例之四:VIRTUAL_HOSTS
教程(视频,书籍)下载:  ASP.NET AutoCAD 数据库 C# ASP java photoshop 网页设计 delphi 3dmax Flash C++ VB 张孝祥 实例   更多请进入BIBIDU搜索
IT搜索引擎   

  This example shows how you might set up virtual hosts. Virtual hosting is
  where different clients access your machine on different IP addresses (virtual
  IPs) 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 been
  added, but it will do for now)
  Step 2) Create a user / location for the new virtual site.
  useradd -d /var/ftp_site2 ftp_site2
  chown root.root /var/ftp_site2
  chmod a+rx /var/ftp_site2
  umask 022
  mkdir /var/ftp_site2/pub
  echo "test" > /var/ftp_site2/pub/content
  Step 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.2
  Step 4) Create the new site, responding on the virtual IP.
  cp /etc/xinetd.d/vsftpd /etc/xinetd.d/vsftpd2
  Edit vsftpd2, and change
  - The bind line to refer to the IP address 192.168.1.10
  - Add the line
  server_args = /etc/vsftpd_site2.conf
  This launches this FTP site with a different vsftpd configuration file.
  cp /etc/vsftpd.conf /etc/vsftpd_site2.conf
  Add two lines:
  ftp_username=ftp_site2
  ftpd_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.2
  Connected 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.2
  Connected 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> quit
  221 Goodbye.
  [chris@localhost vsftpd]$ ftp 192.168.1.10
  Connected 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>
  

来源:upschool.com.cn
作者:
关键字:vsftpd,VIRTUAL,HOSTS
发表日期:2007-1-6 0:46:35

网页显示有限 阅读全文请下载本文完整版WORD文档

上一篇:vsftpd-1.1.3配制实例之五:VIRTUAL_USERS   下一篇:vsftpd-1.1.3配制实例之三:PER_IP_CONFIG


2008-12-2 5:19:19
本文的相类似文章
  • ORACLE Virtual Private Database 全新体验
  • ORACLE 的Virtual Private Database的全新体验
  • vsftpd frequently asked questions
  • vsftpd-1.1.3配制文件vsftpd.conf
  • vsftpd-1.1.3配制实例之四:VIRTUAL_HOSTS
  • vsftpd-1.1.3配制实例之一:INTERNET_SITE
  • vsftpd-1.1.3配制实例之二:INTERNET_SITE_NOINETD
  • vsftpd-1.1.3配制实例之三:PER_IP_CONFIG
  • vsftpd-1.1.3配制实例之五:VIRTUAL_USERS
  • 如何在硬碟建置Linux系统之关於虚拟萤幕 (Virtual Console, VC)
  • 在学习中进步 在进步中成长 教程中国相随您的成长之路
    华腾联合科技股份有限公司版权所有
    广告联系:Rosibo@163.com