0

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

1
  • 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, 2011 at 4:26

2 Answers 2

1

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.

12
  • How does he get traffic to the machine that doesn't have a NIC card?
    – jmort253
    Jan 3, 2011 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, 2011 at 4:33
  • @jmort253: I think you misread his question. Apps1 has only one NIC.
    – GregD
    Jan 3, 2011 at 4:33
  • I sure did... now it's clear :)
    – jmort253
    Jan 3, 2011 at 4:35
  • Do I need to config that virtualhost on my webserver1 or apps1 server?
    – Azrim
    Jan 3, 2011 at 4:49
0
NameVirtualHost 172.16.4.18:80


<VirtualHost 172.16.4.18:80>
  ServerAdmin [email protected]
  DocumentRoot /var/www/html/abc
  ServerName abc.azrim.com
</VirtualHost>

<VirtualHost 172.16.4.18:80>
  ServerAdmin [email protected]
  DocumentRoot /var/www/html/xyz
  ServerName xyz.azrim.com
</VirtualHost>
1
  • above is my code...kindly advise..
    – Azrim
    Jan 21, 2011 at 8:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .