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

I have one webserver and one Application server.

Webserver1 have FreeBSD 8.1, Apache, MySQL and PHP. Application1 server have Centos 5.5, Apache, Mysql and PHP.

Both server running fine independently. My webserver1 is hosting my company website www.azrim.com which running good. Besides I have 2 online application which requires me to host them as a subdomains.

My questions is I want to make subdomains such as abc.azrim.com and xyz.azrim.com is accesscible from Application1 server. Can anyone pls help me on this. What should I do on apaches configuration on both webserver1 and Apps1 server. I only have 1 NIC card on my Apps1 server.

Really appreciate anyone who got the solution. Thanks Azrim

share|improve this question
    
If you only have 1 NIC card, I'm not really sure what you can do. Can the server without the NIC card connect to the network at all? –  jmort253 Jan 3 '11 at 4:26

2 Answers 2

You'll need to setup virtualhosts on the apache server The config will look something like this:

NameVirtualHost IP:80
<VirtualHost IP:80>
   ServerAdmin     EMAIL
   DocumentRoot    /PATH/TO/WEB/FILES
   ServerName      SERVERNAME
</VirtualHost>

It won't be exact, but that should get you on the right path.

share|improve this answer
    
How does he get traffic to the machine that doesn't have a NIC card? –  jmort253 Jan 3 '11 at 4:32
    
Nevermind, his question wasn't clear initially. 1 NIC card on the apps server should work for multiple domains. –  jmort253 Jan 3 '11 at 4:33
    
@jmort253: I think you misread his question. Apps1 has only one NIC. –  GregD Jan 3 '11 at 4:33
    
I sure did... now it's clear :) –  jmort253 Jan 3 '11 at 4:35
    
Do I need to config that virtualhost on my webserver1 or apps1 server? –  Azrim Jan 3 '11 at 4:49
NameVirtualHost 172.16.4.18:80


<VirtualHost 172.16.4.18:80>
  ServerAdmin abc@azrim.com
  DocumentRoot /var/www/html/abc
  ServerName abc.azrim.com
</VirtualHost>

<VirtualHost 172.16.4.18:80>
  ServerAdmin xyz@azrim.com
  DocumentRoot /var/www/html/xyz
  ServerName xyz.azrim.com
</VirtualHost>
share|improve this answer
    
above is my code...kindly advise.. –  Azrim Jan 21 '11 at 8:48

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.