Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was wondering if I could point say ftp.foo.com to like 192.168.1.76 using Document Root. I have two servers, one contains all of the Apache2 stuff, the other, my downloads server. Could I route HTTP port 80 to my webserver, and using virtual hosts, map ftp.foo.com to 192.168.1.76, but still have www.foo.com direct to my website.

Thanks!

share|improve this question
    
Are you behind a router or is this a vps setup? –  John Siu Jan 24 '13 at 5:11

2 Answers 2

I am assuming you are behind a NAT router and only have 1 static external IP.

FTP and HTTP use different port. All you need to do is forward http/https to your web server, forward ftp to you ftp server. This is done on the router.

You do not need a virtual host setup on apache.

share|improve this answer
    
I would rather not use my public IP to access my downloads server –  Keaton Jan 24 '13 at 15:44
    
(1) Is my assumption about the router correct? (2) In that case you may want to use Ziaunys suggestion, mod_proxy_ftp. However, it does not support ftp upload. Additionally, that also means all ftp traffic will pass through your web server box. (3) Is there a specific way you want this ftp server to be used? Maybe briefly describe the situation in the question, we maybe able to suggest some alternatives. –  John Siu Jan 24 '13 at 15:54

You probably want to use apache as a proxy to your ftp server. It has a "mod_proxy_ftp" feature you can enable. This way you can just use your ftp.foo.com cname to match the proxy vhost. Here's a link to the documentation:

http://httpd.apache.org/docs/2.2/mod/mod_proxy_ftp.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.