Access apache virtual hosts

This is a discussion on Access apache virtual hosts within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello, I have a network at home with 2 PCs with WinXp. On PC1 run's apache with some virtual ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-09-2003
John M
 
Posts: n/a
Default Access apache virtual hosts

Hello,

I have a network at home with 2 PCs with WinXp. On PC1 run's apache with
some virtual hosts. (see config below)
If I write demo or demo1 or demo2 into the browser on PC1 it works fine.
But how can I access them from the other computer?

Thanks!

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
DocumentRoot "h:\web\demo"
ServerName demo
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot "h:\web\demo1"
ServerName demo1
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot "h:\web\demo2"
ServerName demo2
</VirtualHost>


  #2 (permalink)  
Old 11-10-2003
DvDmanDT
 
Posts: n/a
Default Re: Access apache virtual hosts

You modify
C:\Windows\System32\drivers\etc\HOSTS and add an entry starting with the ip
of the Apache server, then a tab, then demo1.. .Repeat but with demo2 in the
last step.. :)

--
// DvDmanDT
MSN: dvdmandt€hotmail.com
Mail: dvdmandt€telia.com
##########################
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/defau...er&hcName=swen
http://securityresponse.symantec.com...swen.a@mm.html
##########################
"John M" <bali1a@freemail.hu> skrev i meddelandet
news:Wwyrb.1049$ky5.42154@news.chello.at...
> Hello,
>
> I have a network at home with 2 PCs with WinXp. On PC1 run's apache with
> some virtual hosts. (see config below)
> If I write demo or demo1 or demo2 into the browser on PC1 it works fine.
> But how can I access them from the other computer?
>
> Thanks!
>
> NameVirtualHost 127.0.0.1
>
> <VirtualHost 127.0.0.1>
> DocumentRoot "h:\web\demo"
> ServerName demo
> </VirtualHost>
>
> <VirtualHost 127.0.0.1>
> DocumentRoot "h:\web\demo1"
> ServerName demo1
> </VirtualHost>
>
> <VirtualHost 127.0.0.1>
> DocumentRoot "h:\web\demo2"
> ServerName demo2
> </VirtualHost>
>
>



  #3 (permalink)  
Old 11-11-2003
Chris DePetro
 
Posts: n/a
Default Re: Access apache virtual hosts

Change the IP address in you VirtualHost section to your LAN address.
127.0.0.1 is localhost. That is why the PC running Apache can see the pages
and the other cannot. Give the PC running Apache a static IP address if
possible.

Chris DePetro
RHCT


"John M" <bali1a@freemail.hu> wrote in message
news:Wwyrb.1049$ky5.42154@news.chello.at...
> Hello,
>
> I have a network at home with 2 PCs with WinXp. On PC1 run's apache with
> some virtual hosts. (see config below)
> If I write demo or demo1 or demo2 into the browser on PC1 it works fine.
> But how can I access them from the other computer?
>
> Thanks!
>
> NameVirtualHost 127.0.0.1
>
> <VirtualHost 127.0.0.1>
> DocumentRoot "h:\web\demo"
> ServerName demo
> </VirtualHost>
>
> <VirtualHost 127.0.0.1>
> DocumentRoot "h:\web\demo1"
> ServerName demo1
> </VirtualHost>
>
> <VirtualHost 127.0.0.1>
> DocumentRoot "h:\web\demo2"
> ServerName demo2
> </VirtualHost>
>
>



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:09 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0