Forum Moderators: phranque

Message Too Old, No Replies

Websites not showing up.

Using virtual hosts and the websites don't appear

         

dannic

6:09 pm on Aug 26, 2005 (gmt 0)

10+ Year Member



running Redhat core 2 with apache 2.x.x

I have two domains on virtual hosts currently. When I use webmin to add virtual hosts they seem to add just fine.

I currently use godaddy for a registrar so I changed the dns servers to the dns servers for the two domains I already have running.

The problem I have is that even when I do everthing I seem to need to do I cannot reach the darn websites. They are showing up with the proper dns record in whois but I get a cannot find.

Is there something I am misconfiguring with virtual server? Or would it be the dns server that is giving me the problem?

How do i let the dns server know that I have new domains being hosted? I thought it was automatically done through apache.

jdMorgan

7:13 pm on Aug 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> How do i let the dns server know that I have new domains being hosted? I thought it was automatically done through apache.

No Apache doesn't communicate with the DNS system in this way. It can do reverse-DNS lookups, but only *after* a request arrives at the server. And no request will arrive at the server if DNS isn't properly configured.

Never forget that "domains" are a convenience layer added to TCP/IP to make it easier for humans to use. When a user requests a domain, the browser sends a request to the DNS system to get the IP address for that domain. Then, the connection to the server is established using that IP address. In HTTP/1.1 the domain name is sent along with that request in the HTTP request header, but it is not used to establish the TCP/IP connection.

(HTTP/1.0 does not support the sending of domain names in the request header, and so cannot be used with virtual name-based hosts. There are some 'extended' HTTP/1.0 clients --such as search engine robots-- that add the host name to the request header, but are otherwise HTTP/1.0 compliant/compatible. HTTP/1.1 made name-based virtual hosting possible; This was one of its major purposes.)

Once this TCP/IP connection has been made to the server, Apache *can* read the domain name sent in an HTTP/1.1 request header. It can then look through its list of virtual "name-based" hosts to see if it has a "site" defined for that host name. This is not necessary on servers hosting single sites with a dedicated IP address, so this is why name-based virtual hosting is an 'extra feature' on Apache and requires more configuration work.

It sounds to me like you don't have DNS set up. Look around in your control panel for "DNS setup" or a "Zone File editor." Use this tool to define the IP address associated with your new domain names in your DNS servers. Once DNS is defined in your specified domain name servers, it will be copied "it will propagate" to the other DNS servers worldwide. This process can take up to three days, depending on how many layers of DNS servers have to update, and how often each one updates itself.

Generally, the zone file record looks like this:

www.domain.com. 86400 IN A 192.168.0.1
domain.com. 86400 IN A 192.168.0.1

or, if wild-card DNS is desired:

*.domain.com. 86400 IN A 192.168.0.1

The first parameter is the domain name, the second is this record's Time-To-Live in seconds (the time shown here is one day, after which all DNS servers should "refresh" their copy of this data), and the third parameter specifies an "Internet" connection.

The next parameter, "A", stands for "Address Record," and the final parameter is the IP address where requests for this domain should be routed to.

You may also wish or need to define the Mailservers for your new domains. That is done using MX (Mail eXchange) records, also in the zone file. You should be able to work out what to add to your zone file by looking at what is there for your existing, working domains.

Note the periods after the domain names in the A records above. They are required.

Jim

dannic

10:41 pm on Aug 26, 2005 (gmt 0)

10+ Year Member



where would I locate the dns record on my linux server? What service provides this. It isn't configured in my webmin and i'm not getting lots of help from the host.

jdMorgan

3:46 am on Aug 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The DNS record is on your designated DNS servers, as given in the Whois info for your domains. Usually, if those domain servers are provided by your host, then they also provide an interface to modify your zone file.

If your DNS servers are provided by someone else, then they should be providing you with an interface to maintain your DNS records.

Jim