#1
  1. cave painting, the 1st Opn Src
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2003
    Posts
    532
    Rep Power
    0

    FTP redirect howto


    I have my hosting box all set on a rewrite from server A to server B. But, my ftp is barfing, I get a SERVER NOT FOUND issue.

    my rewrite block is :
    <VirtualHost 192.168.0.109:80>
    ServerName xxxxxxxx.org
    RewriteEngine on
    RewriteRule ^/icons/(.+) - [PT,L]
    RewriteRule ^/var/www/html/xxxxxxxx.org/(.+) $1 [R,L]
    RewriteRule ^(.+) http://192.168.0.202/$1 [P,L]
    </VirtualHost>

    How can I add FTP to this rewrite? Do I add
    RewriteRule ^(.+) ftp://192.168.0.202/$1 [P,L]
    to this block? or, do I need a new block?
    Curious by Nature,
    Linux by Choice
    Lawson ERP reference tools: Lawsuss.com
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    Originally Posted by dba_frog
    How can I add FTP to this rewrite? Do I add
    RewriteRule ^(.+) ftp://192.168.0.202/$1 [P,L]
    to this block? or, do I need a new block?
    Are you sure that your apache is serving FTP? I doubt, there is only unstable modules available for this to my knowledge.

    (moved to FTP HELP)

    M.
  4. #3
  5. cave painting, the 1st Opn Src
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2003
    Posts
    532
    Rep Power
    0
    Maybe I'm looking at this the wrong way...
    I have a server box (a) that redirects to another webserver box(b) on my network.
    When I try to log in to the the server box (b) it sez...'server not found', because the request came thru box (a) and didn't know where to redirect the ftp request.

    So, I thought that since I redirected my http requests from box (a) to box (b), i'd just update the VirtualHost for the redirect and the FTP would go thru.

    thoughts and\or corrections to dilemma?
    Curious by Nature,
    Linux by Choice
    Lawson ERP reference tools: Lawsuss.com
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    You can't redirect ftp with apache. You have to configure your FTP server to do this, if possible at all.

    M.
  8. #5
  9. cave painting, the 1st Opn Src
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2003
    Posts
    532
    Rep Power
    0
    NP...I'll recofig the router to move the port 21 traffic to that box...just a little cumbersome if I wanna have FTP to my other box

    thanks tho
    Curious by Nature,
    Linux by Choice
    Lawson ERP reference tools: Lawsuss.com
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    Originally Posted by dba_frog
    NP...I'll recofig the router to move the port 21 traffic to that box...just a little cumbersome if I wanna have FTP to my other box

    thanks tho
    Unfortunately, this is only half of the game.
    FTP is using two connections: A control connection (Port 21) and a data connection (ports configured in client and / or server ; depends on the "passive/active" settings).

    If you really have to use FTP but you can not redirect your DNS A record to the server, then install a ftp proxy on your router.

    The best solution would be pointing your A record to the ftp server and dealing with redirecting the other services on that machine.

    FTP is one of the most troublesome services to set up because it's hard to tell which ports are going to be used.
    Use a ftp proxy to avoid the problems, but triple your traffic....

    M.

IMN logo majestic logo threadwatch logo seochat tools logo