Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have apache2 web server installed on Ubuntu Server which provides the service at Also, I've been created a directory named ubuntu on apache's root directory.

Now, the idea is to link or mount this local directory to or it's ftp pal! I mean if someone request or, the local apache server should provide service from transparently!

What's your idea? how this is possible without using a new port and iptables as forwarder?

Thanks in advance!

share|improve this question
Do you have a local DNS server? – ir01 Jun 8 '13 at 10:06
@ir01, yes we do. – Yasser Zamani Jun 9 '13 at 19:06
We have a same problem. We clone the sites(Netbeans rep. Ubuntu rep.) and redirect the DNS records to local address. Why the @davidgo answer is NOT correct(or impractical)? – ir01 Jun 10 '13 at 4:42
@ir01, just read my first comment on his answer; I would not like to CLONE that sites, I would like to create a symbolic link in Apache to outside world. – Yasser Zamani Jun 11 '13 at 0:18

You would need to create a "fake" site, and then modify the DNS for people using this site. Depending on how this is done it could range from modifying the hosts file (easy, just add the line to redirecting DNS to your nameserver and providing the answer you want with a specially crafted zone or a modified routing table.

I note you asked how its possible without using a new port and iptables as a forwarder. I have assumed above that this means "no IPTables". Depending on how literally you interpret this you might be able to insert a transparent proxy in the path - this would use a transparent proxy server and iptables, but no "new port".

share|improve this answer
In your first paragraph, I need to completely clone and all underlying staff recursively to my local fake server, right? if so, actualy I asked this question here to avoid this! I just try to found out if Apache supports this scenario via a simple command like mount /ubuntu while linux simply can do this on file systems! – Yasser Zamani Mar 18 '13 at 7:43
You have not specified what you want clearly, but you can probably do it by setting up a reverse proxy in Apache using mod-proxy to get parts of the archive off the original server, and serve parts of it locally. All traffic would still need to go through your server though and you will still need to redirect the traffic to your server in place of the real one. From what you described the hard bit will be probably be getting the traffic to your server. – davidgo Mar 18 '13 at 8:36

Your Answer


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.