-1

I am using CentOS 6, BIND and HTTPD

I have created 3 machine: DNS Server, HTTPD Server, Client Machine - All are working in a virtual environment under VMWare.

IP of DNS server is: 10.0.2.16

IP of HTTP server is: 10.0.2.18

I have created two websites on HTTPD server and inside named.conf, I have placed two VirtualHost Tags working on port no. 80 with unique server names and document root as:

web1.example.com

web2.example.com

In forward zone of example.com, I have created a record for each as:

web1.example.com IN A 10.0.2.18

web2.example.com IN A 10.0.2.18

The problems is that with both domains, only first website opens up.

What is the issue here and what is the possible solution?

Neetu
  • 1

1 Answers1

0

Put this into the bottom of your httpd.conf:

<VirtualHost _default_:80>
        DocumentRoot "/path/to/web1"
        ServerName web1.example.com:80
        ServerAdmin info@example.com
</VirtualHost>                           
<VirtualHost _default_:80>
        DocumentRoot "/path/to/web2"
        ServerName web2.example.com:80
        ServerAdmin info@example.com
</VirtualHost>                           
Jonas Bjork
  • 386
  • 1
  • 4