« Previous Next »

Thread: using real domains in FTP

Last post 10-13-2008 2:11 PM by steve schofield. 5 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (6 items)

Sort Posts:

  • 10-12-2008, 11:12 AM

    using real domains in FTP

    Hi.

    I have multiple domains (or "hostnames" if you prefer) set up to a single IP address on which I have Windows 2008 with IIS7 and its FTP. I'd like to make it so that when a request comes from a certain domain, that domain's FTP instance would process it.

    I was once able to do that by right clicking on a web site in the IIS Manager and selecting "Add FTP Publishing". Nowadays, if I try to start a second FTP instance created in this fashion, I get an error saying "This FTP server cannot be started. Another FTP site may be using this port". Another site is indeed using the same port, but the whole point is to have one FTP server manager all instances depending on the domain used.

     I could use virtual hosts, but this means the username would have to be "domain|username" and I don't want that... the domain will be written as the server name anyway, so that's a needless burden on the end user.

    Any ideas what I might be doing wrong? Is it a regression from a certain update or something (I do have all updates and hotfixes to date installed)? If it is, does anyone have an idea when/if it is going to be fixed? If there's an alternative way of doing this (say, something with .config files), I'm ready to try it out.

    (btw, my server is not behind a router or a hardware firewall, in case that would matter. I use Windows Firewall, which appears to be configured properly.)

  • 10-12-2008, 9:29 PM In reply to

    Re: using real domains in FTP

    What you described is exactly how FTP publishing is supposed to work.  There can be only one FTP site using port 21.  If you wanted each domain, then assign a ip per real domain.  As you mentioned, using 'virtual hosts' is a way.  Also, You could setup a single FTP site, assign a virtual directory 'per domain' and have the person login that way.  I'm not aware of anything magical that allows anything different.  the FTP in IIS 6 was the same way, except it had a separate site instead of a FTP binding, but the concept with the IP and port 21 was the same.

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 10-13-2008, 10:17 AM In reply to

    Re: using real domains in FTP

    Isn't there a "host header" or something like that within the FTP session itself that can reveal the hostname by which the FTP was accessed? If there is, there must be some way the FTP server can use it for this purpose.

     As I said, I was once able to do this. Both FTP server isntances were started, and I'm guessing IIS "merged" them into one instance that responds differently based on the host indicator. I don't know why it stopped working... unless maybe I was dreaming (that would have to be a very realistic dream).

     At least, is there a way I can redirect/alias to a virtual subfolder based on the username ("user isolation" like, only with virtual paths rathar than physical ones)?

    I always thought that

    Shared hosting improvements:
    By fully integrating into IIS 7.0, the new FTP service makes it possible to host FTP and Web content from the same site by simply adding an FTP binding to an existing Web site...

    means exactly that. It's too bad if it simply can't be done in this way (and on a single IP).
  • 10-13-2008, 11:21 AM In reply to

    Re: using real domains in FTP

    boen_robot:
    Isn't there a "host header" or something like that within the FTP session itself

    Nope.  FTP doesn't have a host header in the protocol, it's entirely faked within FTP7.  The only options are binding FTP to a site or using a different IP/Port combination.

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 10-13-2008, 12:06 PM In reply to

    Re: using real domains in FTP

    jeff@zina.com:
    The only options are binding FTP to a site

    I do have the FTPs binded to a site... to an IIS7 web site that is. But I'm guessing you're reffering to virtual hosts, correct? Oh well.... I guess I'll be forced to create this burden on the end user.

  • 10-13-2008, 2:11 PM In reply to

    Re: using real domains in FTP

    If you are going to use the MS FTP service(s), then you'll need to pass it along to the user if you want the domain included.  I'm not familar enough with 3rd party ftp software if they support something similar you want to do.

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
Page 1 of 1 (6 items)
Microsoft Communities