Problem with VirtualHost
Posted by: RemiONERA (---.onera.fr)
Date: October 29, 2008 09:22AM

Hello

I am a newbee and I am trying to make my website visible from an other computer. I am working on a LAN.
I am using wamp with the apache server v 2.2.8

I have found some tutorials where it is explained how to create a VirtuelHost. This is what I did

I add this in the httpd.conf file:

<VirtualHost 125.40.2.103:80 MonSite.rg>
DocumentRoot c:/wamp/www/GestionDeDoc/
ServerName MonSite.rg
</VirtualHost>


And I add this in the windows host file


127.0.0.1 localhost
125.40.2.103 MonSite.rg

But when I try to acces to MonSite.rg from an other computer in my LAN I get the following error.


Name Error: The domain name does not exist.

I have the same error if I try to access from the computer where the website is stored. But if I use localhost instead of MonSite.rg it works

What's wrong?

Remi

Options: ReplyQuote
Re: Problem with VirtualHost
Posted by: yfastud (Moderator)
Date: October 29, 2008 12:29PM


Options: ReplyQuote
Re: Problem with VirtualHost
Posted by: RemiONERA (---.onera.fr)
Date: October 29, 2008 02:00PM

Thanks a lot it helps a lot. By the way is it possible to avoid to change the etc/host file of the distant computers.

Options: ReplyQuote
Re: Problem with VirtualHost
Posted by: yfastud (Moderator)
Date: October 29, 2008 02:22PM

other pc must be in your lan and edit host file to access your local domains; don't need to do anything w/ pc outside lan and they can only access your sites through ip or real domains

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Problem with VirtualHost
Posted by: RemiONERA (---.onera.fr)
Date: October 29, 2008 02:39PM

Ok you mean that I have to edit the host file of every computer in my LAN which wish to access to my website. I like to know if there is any way to avoid this editing ?.

Options: ReplyQuote
Re: Problem with VirtualHost
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: October 29, 2008 02:53PM

no no way ... u either buy a domain or use a no-ip free one and connect to it over the net. or... in a lan you could rename the server pc as ur website name then [computer] will show it on all lan pcs

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Problem with VirtualHost
Posted by: yfastud (Moderator)
Date: October 29, 2008 03:35PM

the different is using pc name can only access main website while editing all other pc's host will gain access to all local domains; to avoid it, you can use pc name + its folder; however, w/ this way, you might have problem w/ images and links w/ some app :-(

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Problem with VirtualHost
Posted by: RemiONERA (---.onera.fr)
Date: October 29, 2008 03:53PM

In my LAN I can have a DNS this may solve the problem?

Options: ReplyQuote
Re: Problem with VirtualHost
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: October 29, 2008 04:22PM

yup..

get ur own dns server but seems silly. hosts file is the first basic dns server.... u can make a batch filel to rewrite all the host files for u so u dont need to do it manually

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Problem with VirtualHost
Posted by: RemiONERA (---.onera.fr)
Date: October 30, 2008 10:57AM

Well in fact I am not the administrator of the LAN. But I know there is a DNS server in the LAN. So I can ask the LAN admin to my websire IP to the DNS.

Options: ReplyQuote


Sorry, only registered users may post in this forum.