Virtual Hosts

Virtual Hosts

Post by Tonya M. Pascha » Wed, 23 Dec 1998 04:00:00



Hello,

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.)

T.Paschal
Solutions Networks

 
 
 

Virtual Hosts

Post by Philip Wall / Wild Car » Wed, 23 Dec 1998 04:00:00



> Hello,

> 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.)

> T.Paschal
> 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.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Handle:Wild Card

Thought of the day:
Disc space -- the final frontier!

 
 
 

1. Apache 1.3b2: Default Host and all virtual hosts serve only first virtual hosts pages?

Hello.

Have been running 1.2b8 for a intranet and decided to move upto 1.3b2. I
have several name based virtual hosts that have been working under
1.2b8. After compiling and installing 1.3b2 my virtual hosts do not
work. In fact what happens is that even though DocumentRoot and default
server name is different, eg: www.serverA.net pointing to /www/default,
Apache 1.3b2 will always take me to the first defined virtual host as if
it's locked to it no matter what virtual host I try to browse. What
gives? Please post and E-Mail.

In /etc/hosts for my machines IP address I have

A.B.C.D         www.default.net www.virtA.net www.virtB.net

In ../conf/httpd.conf I have;

<VirtualHost www.virtA.net>

DocumentRoot /usr/local/www/virtA
ServerName www.virtA.net
ErrorLog logs/virtA.error.log
TransferLog logs/virtA.access.log
</VirtualHost>

<VirtualHost www.virtB.net>

DocumentRoot /usr/local/www/virtB
ServerName www.virtB.net
ErrorLog logs/virtB.error.log
TransferLog logs/virtB.access.log
</VirtualHost>

--

2. Adaptec PCI 2940

3. FrontPage virtual hosting, removal or reset of virtual host

4. Remote printers

5. : How to prevent one named virtual host from "seeing" another virtual hosts files ?

6. Real audio proxy? (Not Masq)

7. Mixing Apache Name Based Virtual Hosts and SSL Virtual Host

8. sendmail alias problems

9. For Discussion: web virtual hosting vs mail virtual hosting

10. Virtual hosts/virtual IP

11. Name Based Virtual Hosting - Unable to access Virtual domain from IE/Lynx

12. Virtual Server vs. Virtual Host

13. Virtual Servers: WWW, FTP, POP, SMTP, SSL capable (not simply Virtual Hosting)