> I am using Red Hat Linux (v.4.1) and running an Apache Web Server. I am
> in the process of setting up a Virtual Host for my server and have read
> all the documents at the Apache site regarding virtual hosting.
> Following all that protocol I to my knowledge have set the file up
> correctly(httpd.conf), assigned the virtual host a separate IP address
> and updated my DNS server to reflect this. However when I try to access
> the virtual host it goes to the server's default home page and not to
> the virtual host's home page. How do I redirect this process to reflect
> the desired outcome- i.e. a call to the virtual host pulls up the
> virtual host's page not the server's default page? Any help would be
> greatly appreciated. (I am using IP based virtual hosting.)
> Solutions Networks
Which version of Apache are you using? I personally stay away from IP
based virt hosting. I have a limited set of numbers from my link
provider and tend to use those for DNS, mail and ftp.
In the <VirtualHost > opening tag did you put the FQDN or the IP? In
Apache 1.3.3 it will look up the IP, I believe 1.2.x did that as well.
I'm assuming your using Apache 1.3.x . One way to test what Apache is
doing is to try to access the web site by IP instead of by name and then
adjust your VirtualHost sections with the names of the web sites instead
of the IP.
Be warned Apache 1.3 will default to the first listed VirtualHost
section if it can't find the name trying to be accessed listed in a
virtualhost section. What that means is, if you put "ServerName
yadda.badda.com" someplace other than a VirtualHost host section and
then have regular VirtualHost section listed in the file as well. Apache
will use the first VirtualHost section as the default website. Instead
of the way Apache 1.2.x did it.
Also check your DocumentRoot listings in each VertualHost section.
Thought of the day:
Disc space -- the final frontier!