Forum Moderators: open

Message Too Old, No Replies

Using the hosts file for localy hosted sites.

Using subdomains

         

mack

7:24 pm on Sep 16, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I host my site from home on my own connection with fixed ip.

My site resides on a linux server and I have a number of other computers that also share the same line via a hub/router.

When the hosts file on windows xp was standard I would visit my site example.com and i would see the router admin page. What I did was add the following to my hosts file...

ip.of.linux.server www.example.com

Now what I have done is to set up virtual hosting in the following format.

content.examle.com

Each content area is stored bellow wwwroot in the /home/username/public_html directory .

Is there any way for me to be able to view these subdomains by altering the host file.

Thanks very much in advance.

Mack.

charlier

6:55 am on Sep 18, 2004 (gmt 0)

10+ Year Member



I'm not quite sure I understand the problem but normally all you have to do is add the virtual domains to the windows host file as well. You don't need any sort of nameservice as such on the linux box. The windows machine will connect to port 80 on the linux box and httpd will resovle the IP/virtual host name. I assume you are using the same IP number in the virtual host directive.

eg: NameVirtualHost 10.0.10.7:80

If not that is the one you need to add to the windows host file.

Have you checked the virtual host is working on the linux box?
If not try (from linux box command line)

telnet yourlinux.box 80
GET [yourvirtualhost.com...]

and see if you get the page correctly.

mack

5:01 pm on Sep 18, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Adding the subdmaim to the host wouldent help in this case... The virtual domain content is not accesable via the ip. I found a solution though, surv via a proxy. Not ideal but works :)

Mack.