Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I,m having a web server for testing purposes to host my domain http://www.domain.com which run perfectly. Below is server specs:

  • OS Freebsd 7.2
  • MySQL 5.1.33
  • Apache 2.2.11
  • PHP 5.2.9

I can do alias directory in my httpd.conf so that my domain can have subdirectory hosting in the same server such as httpd://domain.com/subdomain1, httpd://domain.com/subdomain2 and so on. All my subdomain1 and subdomain2 directory folders reside on the same web server but only different location.

Below is my example from httpd.conf for the alias subdomain1 block:

Alias /subdomain1 "/usr/local/www/subdomain1"
<Directory "/usr/local/www/subdomain1"> 
Options +Indexes 
AllowOverride None 
allow from all
</Directory>

I,m looking a way in order my subdomain1 and subdomain2 directory is read from another server in my LAN but remain hosted as httpd://domain.com/subdomain1. Really appreciate anyone know how to do this.

Thanks,

share|improve this question

2 Answers 2

The easiest thing to do is mount a NFS (or similar) share then point the alias directory to that mount point.

The FreeBSD Diary has instructions for NFS.
Apache has instructions for alias.

If you want to proxy the request Apache has instructions for proxy too. This is much more complicated, but may be what you're looking for. The first server passes the request to the second server, and returns the resulting page back to the original requester (it acts as a transparent proxy between client and the source server).

share|improve this answer
    
Hi Chris, Thanks for quick solution on this. really appreciate. I already test NFS tips and it works great. My domain server now able to read from the remote server. By doing this now I can implement on how to isolate domain web server (in DMZ zone) and application server (LAN zone) for security purposes. As for the Apache proxy module I would be thinking to test it later. Then only I can decide which method is the best performance for my web server to serve the my application. –  azrim Mar 10 '10 at 7:54

ProxyPass and ProxyPass Reverse is the way forward here.

share|improve this answer

Your Answer

 
discard

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