Web Servers on Unix and Linux - redirecting an ftp request

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > October 2005 > redirecting an ftp request





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author redirecting an ftp request
laredotornado@zipmail.com

2005-10-04, 8:49 pm

Hello,
My clients are currently using their web browsers to access
ftp://mydomain.com, running on a server with Apache 1.31. I wish to
redirect them to ftp.mydomain.com, which is hosted on another server.
Is it possible to construct an .htaccess file to make such a redirect?
Where would I place this file?

Thanks, -

David Dorward

2005-10-05, 2:48 am

laredotornado@zipmail.com wrote:
> My clients are currently using their web browsers to access
> ftp://mydomain.com, running on a server with Apache 1.31. I wish to
> redirect them to ftp.mydomain.com, which is hosted on another server.
> Is it possible to construct an .htaccess file to make such a redirect?


..htaccess files are a place to put Apache configuration directives. Apache
is a very powerful generic server, but its primerally designed to be an
HTTP server, not an FTP server.

While it is *possible* that you are using it as an FTP server, its highly,
highly unlikely (I'm not aware of any prewritten packages to turn Apache in
to an FTP server, although I have seen it used as an SMTP server).

Obviously you can not configure another server running on the same machine
using Apache configuration directives ... and I don't think that the FTP
protocol includes the ability to redirect to another server anyway.

I think that FTP allows you to provide a message of the day, you could run
an ftp server on "mydomain.com"[1] just to provide a MOTD.

Another option might be to use port forwarding to forward ftp requests - but
since ftp has complicated passive/active use of multiple ports that would
be rather tricky.



[1] Do you really own mydomain.com? If not then please use example.com for
examples, that's what it is there for.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Nick Kew

2005-10-05, 7:48 am

David Dorward wrote:

> While it is *possible* that you are using it as an FTP server, its highly,
> highly unlikely (I'm not aware of any prewritten packages to turn Apache in
> to an FTP server, although I have seen it used as an SMTP server).


Interesting. Do you mean in a testing environment, or is someone
running mod_smtpd live?

There are at least two FTP modules: one from covalent.net, one from
outoforder.cc. I don't know how widespread either of them is, but
covalent is one of the oldest names in the apache business and theirs
was once *the* apache-ssl distro that was legal to use in the USA,
so they might easily have some supported, non-techie users for it.

--
Nick Kew
Bob Smith

2005-10-05, 9:01 pm

On 10/5/2005 3:14 AM, David Dorward wrote:
> laredotornado@zipmail.com wrote:
>

[...]
[vbcol=seagreen]
> While it is *possible* that you are using it as an FTP server, its highly,
> highly unlikely (I'm not aware of any prewritten packages to turn Apache in
> to an FTP server, although I have seen it used as an SMTP server).


Isn't it more likely that the user's *browser* when encountering ftp://... is
acting as an FTP client and then sending the request to the specified domain on
the default FTP port #? If so, you'll need an FTP server on the specified
domain to handle the request. I doubt that the Apache server on the specified
domain ever sees this request.

--
________________________________________
_
Bob Smith -- bsmith@sudleydeplacespam.com

To reply to me directly, delete "despam".
David Dorward

2005-10-05, 9:01 pm

Bob Smith wrote:

[vbcol=seagreen]
> Isn't it more likely that the user's *browser* when encountering ftp://...
> is acting as an FTP client and then sending the request to the specified
> domain on the default FTP port #?


If Apache was being used as an ftp server then it would be listening on the
ftp port.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
David Dorward

2005-10-05, 9:01 pm

Nick Kew wrote:

> David Dorward wrote:


[vbcol=seagreen]
> Interesting. Do you mean in a testing environment, or is someone
> running mod_smtpd live?


I was talking to Will Whittaker (mock) at the last two YAPC::EUs[1]. He is
using mod_perl with Apache to do it (I don't think mod_smtpd is involved at
all). IIRC its still only being used internally[2], but has had a dramatic
impact on their bandwidth usage for receiving spam.

Some reference to it at http://use.perl.org/~barbie/journal/21075

http://search.cpan.org/~mock/Apache.../Apache/SMTP.pm

[1] http://www.yapceurope.org/

[2] That is, the complete solution isn't public, but it does listen on
public facing ips and does collect real email.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com