httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorge Schrauwen <jorge.schrau...@gmail.com>
Subject Re: [users@httpd] Setting Up Virtual Host Help Needed on WinXP
Date Thu, 03 Jun 2010 21:28:55 GMT
Hi,

If you add a new virtualhost and give it a hostname (in your case "myapps")
you're computer must be able to resolve the name to an IP. Most browser will
append .com and prepend www. if they can't find one.

So you're assumption of needing to add and entry to your hosts file is
correct.

Kind regards

~Jorge


On Thu, Jun 3, 2010 at 11:21 PM, Chris Montgomery <chrisncats@gmail.com>wrote:

> Howdy,
>
> I'm new to Apache web server. I have installed Apache 2.2.15 on my Windows
> development computer to become familiar with using it to run my web sites
> locally. The live production server will run them on a linux box under
> Apache, so I want to get used to working with Apache in my development
> environment.
>
> I have Apache running locally and tested it by hitting http://localhost/in my browser
and getting the "It works!" web page. Now I want to simply hit
> an index.html page in the top-level directory that will hold all of my
> sites. On my development box in Windows XP, I have all of my sites under
> d:\webapps\myapps (e.g. d:\webapps\myapps\site1, d:\webapps\myapps\site2,
> etc.). I have put a dummy index.html page under d:\webapps\myapps\ and
> attempted to set up a virtual host pointing to it but it isn't working for
> me.
>
> Here's what I have in my httpd-vhosts.conf file (which is being included in
> the httpd.conf file):
>
> NameVirtualHost *:80
>
> <VirtualHost *:80>
>    DocumentRoot "D:/webapps/myapps/"
>    ServerName myapps
>    ErrorLog "logs/myapps-error.log"
>    CustomLog "logs/myapps-access.log" common
> </VirtualHost>
>
> Now when I hit http://myapps/index.html in my browser, it redirects to
> http://www.myapps.com/index.html with a page not found error.
>
> Clearly, I'm not understanding how this works. Am I supposed to have an
> entry for myapps in the Windows hosts file (e.g. 127.0.0.1 myapps)?
>
> Any assistance in helping this Apache newbie to get started on this would
> be greatly appreciated. Thanks!
>
> --
> Best regards,
>
> Chris Montgomery
>
> ---------------------------------------------------------------------
> 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