httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Zuelow <James_Zue...@ci.juneau.ak.us>
Subject RE: [users@httpd] Testing virtual hosts on a virtual machine
Date Tue, 24 Nov 2009 18:55:35 GMT


> -----Original Message-----
> From: Emmanuel Bailleul [mailto:Emmanuel.Bailleul@telindus.fr] 
> Sent: Tuesday, 24 November, 2009 09:49
> To: users@httpd.apache.org
> Subject: RE: [users@httpd] Testing virtual hosts on a virtual machine
> 
> 
> > -----Message d'origine-----
> > De : Florent Georges [mailto:darkman_spam@yahoo.fr]
> > Envoyé : mardi 24 novembre 2009 18:39
> > À : Apache HTTPD users list
> > Objet : [users@httpd] Testing virtual hosts on a virtual machine
> > 
> >   Hi,
> > 
> >   I am using a virtual box (Ubuntu server 9.10 with VMware Fusion)
> > to test a web server.  No problem to install Apache on this
> > Ubuntu box, of course.  And I can access the default page after
> > an install by using http://xxx.xxx.xx.xx/ in my browser (on the
> > host machine.)
> > 
> >   But the web server will use named virtual hosts.  I guess that
> > won't work as the browser won't send the correct domain name.
> > 
> >   Is there any tool to test an Apache instance with virtual hosts
> > on a virtual machine?  Any best practice or advice to follow in
> > that configuration?
> > 
> >   Regards,
> > 
> > --
> > Florent Georges
> 
> Hi,
> 
> Why not just use curl with '-H' option, just as in:
> $ curl -v -H "Host: vh1.domain.tld" http://<IP address>
> 
> This way curl will request httpd using "Host: vh1.domain.tld" header.
> 
> Regards.
> 
> Emmanuel
> 

You could also adjust the hosts file on a machine you use for testing, so that the virtual
host names all point to the IP address of the virtual machine.  That would allow you to use
normal browsers, etc.

James
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message