hitting apache across home network with hosts file
hitting apache across home network with hosts file
am 28.01.2010 20:15:13 von Matthew Smith
--0016e6d7856dd81733047e3e573f
Content-Type: text/plain; charset=ISO-8859-1
In the past I just had one machine. I ran apache on it. I modified the
hosts file to point aliases to the local box.
127.0.0.1 mysite_com So in my browser, I could type in: mysite_com
(underscore instead of dot) and bring up the site. Now I have a new box
running windows 7 that will be the machine I use for dev. I have assigned
the server a static Ip of 192.168.1.2 and the computer name "server".
I have modified the conf file to listen to ip 192.168.1.2 I have tried to
modify the hosts file on the win 7 machine with the following different
things: server mysite_com \\server mysite_com 192.168.1.2 mysite_com
All of these fail to bring up the site. I can remote desktop to the machine
via its ip or name. What am I doing wrong?
--0016e6d7856dd81733047e3e573f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
; ">In the past I just had one machine. I ran apache on it. I mod=
ified the=20
hosts file to point aliases to the local box.
le-style-span" style=3D"font-size: 12px; white-space: pre; ">
iv>
ace: pre; ">127.0.0.1 mysite_com
So in my browser, I could type in:
mysite_com
(underscore instead of dot) and bring up the site.
Now I have a new box running windows 7 that will be the machine I use for d=
ev. I have assigned the server a static Ip of 192.168.1.2 and the comp=
uter name "server".
pan" style=3D"font-size: 12px; white-space: pre; ">
; white-space: pre; ">I have modified the conf file to listen to ip 192.168=
..1.2
I have tried to modify the hosts file on the win 7 machine with the followi=
ng=20
different things:
server mysite_com
\\server mysite_com
192.168.1.2 mysite_com
All of these fail to bring up the site. I can remote desktop to the ma=
chine via=20
its ip or name.
What am I doing wrong?
--0016e6d7856dd81733047e3e573f--
Re: hitting apache across home network with hosts file
am 28.01.2010 20:26:16 von Programmer In Training
--------------enigE14BAD97DD6E421FAA1461CD
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 1/28/2010 1:15 PM, Matthew Smith wrote:
> In the past I just had one machine. I ran apache on it. I modified th=
e
> hosts file to point aliases to the local box.
>=20
> 127.0.0.1 mysite_com So in my browser, I could type in: mysite_com
> (underscore instead of dot) and bring up the site. Now I have a new box=
> running windows 7 that will be the machine I use for dev. I have
> assigned the server a static Ip of 192.168.1.2 and the computer name
> "server".
>=20
> I have modified the conf file to listen to ip 192.168.1.2 I have tried
> to modify the hosts file on the win 7 machine with the following
> different things: server mysite_com \\server mysite_com
> 192.168.1.2 mysite_com All of these fail to bring up the site. I can=
> remote desktop to the machine via its ip or name. What am I doing wrong=
?
The hosts file is only for the local machine. It does not redirect to
another machine nor work on any other machine.
--=20
Yours In Christ,
PIT
Emails are not formal business letters, whatever businesses may want.
--------------enigE14BAD97DD6E421FAA1461CD
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJLYeTeAAoJEENZQ8DH7rW0z28H/2Ro8LEs4maR01hgISsL VZFN
ZzzycxPRJiQMnFfLNA6cs2YjWJ58qRJTW9Wfp/kKuBz/UpaO7WESqKPtKe3g pJig
x3CGE9kAjzSHgCeBvnd0ZWcMULBDjUmSKfPrJ99sANNB1gCwCJoy1xV99yjb +Hkl
//aGc7mCoEnZ4yU2XpAjnZHkUoK+35HUAJccZ056BNEqEZ6nzO28yQVDjHKc +bqe
Pu6i5NxsLKxIu4teZHg0LGdKeLsZre5HMUO9e8zmSCcvuTK0W55KRlrQd/fD ejD6
fJFQLaJcbFhTbSpWEfF4gkJBzHA1+ejsY+5wp720Gaj4S9ghSzbdnteqlXtU 67E=
=DRKa
-----END PGP SIGNATURE-----
--------------enigE14BAD97DD6E421FAA1461CD--
Re: hitting apache across home network with hosts file
am 28.01.2010 21:08:44 von Matthew Smith
--0016e6db2b1c3524f9047e3f17b2
Content-Type: text/plain; charset=ISO-8859-1
I understand that. I should have made myself more clear.
I have modified the windows 7 machine host file to the following:
192.168.1.2 mysite_com
On Thu, Jan 28, 2010 at 1:26 PM, Programmer In Training <
pit@joseph-a-nagy-jr.us> wrote:
> On 1/28/2010 1:15 PM, Matthew Smith wrote:
> > In the past I just had one machine. I ran apache on it. I modified the
> > hosts file to point aliases to the local box.
> >
> > 127.0.0.1 mysite_com So in my browser, I could type in: mysite_com
> > (underscore instead of dot) and bring up the site. Now I have a new box
> > running windows 7 that will be the machine I use for dev. I have
> > assigned the server a static Ip of 192.168.1.2 and the computer name
> > "server".
> >
> > I have modified the conf file to listen to ip 192.168.1.2 I have tried
> > to modify the hosts file on the win 7 machine with the following
> > different things: server mysite_com \\server mysite_com
> > 192.168.1.2 mysite_com All of these fail to bring up the site. I can
> > remote desktop to the machine via its ip or name. What am I doing wrong?
>
> The hosts file is only for the local machine. It does not redirect to
> another machine nor work on any other machine.
>
> --
> Yours In Christ,
>
> PIT
> Emails are not formal business letters, whatever businesses may want.
>
>
--0016e6db2b1c3524f9047e3f17b2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I understand that. =A0I should have made myself more clear.
<=
div>I have modified the windows 7 machine host file to the following: =
192.168.1.2 mysite_com
On Thu, Jan 2=
8, 2010 at 1:26 PM, Programmer In Training
<
"mailto:pit@joseph-a-nagy-jr.us">pit@joseph-a-nagy-jr.us> wro=
te:
x #ccc solid;padding-left:1ex;">
On 1/28/2=
010 1:15 PM, Matthew Smith wrote:
> In the past I just had one machine. =A0I ran apache on it. =A0I modifi=
ed the
> hosts file to point aliases to the local box.
>
> 127.0.0.1 mysite_com So in my browser, I could type in: mysite_com
> (underscore instead of dot) and bring up the site. Now I have a new bo=
x
> running windows 7 that will be the machine I use for dev. =A0I have
>
> assigned the server a static Ip of 192.168.1.2 and the computer name
r>
> "server".
>
> I have modified the conf file to listen to ip 192.168.1.2 I have tried=
> to modify the hosts file on the win 7 machine with the following
> different things: server =A0 mysite_com \\server =A0 mysite_com
> 192.168.1.2 =A0 mysite_com All of these fail to bring up the site. =A0=
I can
> remote desktop to the machine via its ip or name. What am I doing wron=
g?
The hosts file is only for the local machine. It does not redir=
ect to
another machine nor work on any other machine.
--
Yours In Christ,
PIT
Emails are not formal business letters, whatever businesses may want.
--0016e6db2b1c3524f9047e3f17b2--
Re: hitting apache across home network with hosts file
am 28.01.2010 21:12:40 von Programmer In Training
--------------enigA747BB94DA492B27BD0CD780
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 1/28/2010 2:08 PM, Matthew Smith wrote:
> I understand that. I should have made myself more clear.
>=20
> I have modified the windows 7 machine host file to the following:
> 192.168.1.2 mysite_com
Only requests from the Windows 7 machine will resolve mysite_com to
192.168.1.2
Any other machine on the network will have to have their hosts file
similarly modified.
--=20
Yours In Christ,
PIT
Emails are not formal business letters, whatever businesses may want.
--------------enigA747BB94DA492B27BD0CD780
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJLYe+/AAoJEENZQ8DH7rW09P0H/2qNtG5/QhwQt5A+tAUu /Ff7
CX2q9CdRAhDf3AJabl1k2FUE97103AoweHP//VMUG0b78wNzaXyDuBG0msZU SAH3
HEUQ9ptXPe039W586TGqrijyUV32SwRGTMaoghVlxnbzcqxjcHQjVQ0Bj2ZO 98iB
Xj/a2M3HpJ3+sMB0SeqLwGC+JM732P08wQ1hH0Sy87ym/ItBXfyTNBmQWOVa 5mS6
liS0mf2X3DH2pmndRyd5LWtOwPbfHybb7+/4zywnTsap18JMfF69NI6HWWIj nAA+
EBtFiOJ9lYKAdyqzMzBvsboxcNGhX5ynGgtVElPPZc0br3og6JJcpvVp3aQ8 rNE=
=AsIN
-----END PGP SIGNATURE-----
--------------enigA747BB94DA492B27BD0CD780--
Re: hitting apache across home network with hosts file
am 28.01.2010 21:29:20 von Matthew Smith
--0016e6d64956eaf544047e3f60b6
Content-Type: text/plain; charset=ISO-8859-1
I understand that. I am only trying to access the server from the windows 7
machine.
To clarify:
server, 192.168.1.2, running apache
Windows 7 machine, hosts file modified to:
192.168.1.2 mysite_com
Windows 7 machine unable to load http://mysite_com/ in browser.
On Thu, Jan 28, 2010 at 2:12 PM, Programmer In Training <
pit@joseph-a-nagy-jr.us> wrote:
> On 1/28/2010 2:08 PM, Matthew Smith wrote:
> > I understand that. I should have made myself more clear.
> >
> > I have modified the windows 7 machine host file to the following:
> > 192.168.1.2 mysite_com
>
> Only requests from the Windows 7 machine will resolve mysite_com to
> 192.168.1.2
>
> Any other machine on the network will have to have their hosts file
> similarly modified.
>
> --
> Yours In Christ,
>
> PIT
> Emails are not formal business letters, whatever businesses may want.
>
>
--0016e6d64956eaf544047e3f60b6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I understand that. =A0I am only trying to access the server from the window=
s 7 machine.
To clarify:
server, 192.168.1.2, =
running apache
Windows 7 machine, hosts file modif=
ied to:
192.168.1.2 mysite_com
Windows 7 machine unable to load
ref=3D"http://mysite_com/">http://mysite_com/ in browser.
lass=3D"gmail_quote">On Thu, Jan 28, 2010 at 2:12 PM, Programmer In Trainin=
g
<pit@jose=
ph-a-nagy-jr.us> wrote:
x #ccc solid;padding-left:1ex;">
On 1/28/2010 2:08 PM, Mat=
thew Smith wrote:
> I understand that. =A0I should have made myself more clear.
>
> I have modified the windows 7 machine host file to the following:
> 192.168.1.2 mysite_com
Only requests from the Windows 7 machine will resolve mysite_com to
r>
192.168.1.2
Any other machine on the network will have to have their hosts file
similarly modified.
--
Yours In Christ,
PIT
Emails are not formal business letters, whatever businesses may want.
--0016e6d64956eaf544047e3f60b6--
Re: hitting apache across home network with hosts file
am 28.01.2010 23:01:55 von Programmer In Training
--------------enigEF07FB96CFBC19C3F48843D8
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 1/28/2010 2:29 PM, Matthew Smith wrote:
> I understand that. I am only trying to access the server from the
> windows 7 machine.
Sorry, it sounded like you were trying to access from another machine.
> To clarify:
> server, 192.168.1.2, running apache
>=20
> Windows 7 machine, hosts file modified to:
> 192.168.1.2 mysite_com
> Windows 7 machine unable to load http://mysite_com/ in browser
What's the relative bits from your conf file?
--=20
Yours In Christ,
PIT
Emails are not formal business letters, whatever businesses may want.
--------------enigEF07FB96CFBC19C3F48843D8
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJLYglaAAoJEENZQ8DH7rW0KjAIAIU8gnGm9JpG/iI65Yy1 9HL3
8fb44VMvX6ORrDgulC7L13xUEsL3YMZFrqWNivduIXt/mAs7JpaojolwM4NT H1xv
PU2yfXc0NxnFe6d67ZAo0qaoWY/g+E3kL7T2JR9AG2I2GgxWeknl4uXmdqGg OTEV
GHfRQ5o+mGPrZiwUXREubAqor0/JWsM5crKlD/9DSHTuHJKH3Eeq9RawLB8G SyLP
3YVDBssO5hwzr/Kl44Afqc3i0WISQqXDlLS33LGvq+a4nN9wCV3HLz+6vB8b XCch
91hwDFQfycwyHWYWodpkNsDT3kLsVYWDvCFlKKTIPvsaCZig0pa4jlXtw1+o 0bE=
=gEZ5
-----END PGP SIGNATURE-----
--------------enigEF07FB96CFBC19C3F48843D8--
Re: hitting apache across home network with hosts file
am 29.01.2010 03:46:39 von LuKreme
On 28-Jan-2010, at 13:08, Matthew Smith wrote:
>=20
> I have modified the windows 7 machine host file to the following:
> 192.168.1.2 mysite_com
Is that the correct format for the hosts file in Windos? I seem to =
recall the Windows host file was 'different'
Did you verify that the hosts file is in the right location? Check the =
registry for
=
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ Parameters\Dat=
aBasePath
and see where it should be.
--=20
I DID NOT INVENT IRISH DANCING
Bart chalkboard Ep. 5F03
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: Re: hitting apache across home network with hostsfile
am 29.01.2010 13:48:50 von Programmer In Training
--------------enig27F78D2BDF0BE5AD02EC9EA1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 1/28/2010 8:46 PM, LuKreme wrote:
> On 28-Jan-2010, at 13:08, Matthew Smith wrote:
>>
>> I have modified the windows 7 machine host file to the following:
>> 192.168.1.2 mysite_com
>=20
> Is that the correct format for the hosts file in Windos? I seem to reca=
ll the Windows host file was 'different'
>=20
> Did you verify that the hosts file is in the right location? Check the =
registry for
>=20
> \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ Parameters\=
DataBasePath
>=20
> and see where it should be.
>=20
That is the correct format. It's pretty much exactly the same as *Nix
(I've run both Windows (since 95) and Linux (on and off since RH 6.2,
currently have a FreeBSD 8.0 box)), though I have noticed that Vista and
XP put it in two different locations (e.g. there are two hosts files).
--=20
Yours In Christ,
PIT
Emails are not formal business letters, whatever businesses may want.
--------------enig27F78D2BDF0BE5AD02EC9EA1
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJLYtkzAAoJEENZQ8DH7rW0uScH/29J1cKIQ7oYCZNH25o8 NToc
hTseYU/om2GSqoVmRYlFPh3PI0YK6cMhxrW9lL4V7MZj8qHjGg/9tNNotdMQ mfPx
iwc7/TBSnhvVCTKrk6UnuLtSlBgFxsELT3cJxSIaITo0mY5r6WCla8BNhiMv HR+9
Kd348BZiN8+bjYNNaIEVSaqJymYVw7TVfhxu1p/oPbZmzI8s3nKHcMFwuy1O dYLa
duTpQ4ROrlmpnrrHYcwThW9C/t4nYOs97lrDzxwvKhDMfYr1zykfomxN+EsN 5P/0
KxjHGixuKmJZg0Ry6M/bctprQ7SewsjChrlLKiDxrblLQBdxal1K4X4dthKI qa0=
=vqOb
-----END PGP SIGNATURE-----
--------------enig27F78D2BDF0BE5AD02EC9EA1--
Re: hitting apache across home network with hostsfile
am 29.01.2010 15:21:08 von mwood
--Yylu36WmvOXNoKYn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Since remote desktop can resolve the name, your hosts file should be
correct. ("192.168.1.2 myhost_com" should work, although if you're
calling that host "server" now then you may want to add that at the
end of the line, after a space.)
Silly question: you *did* restart HTTPD after updating its
configuration?
Is there anything interesting in HTTPD's logs? If it thinks it should
be named "server" but couldn't resolve "server" then it may be having
some sort of identity crisis. Come to think of it, you don't mention
whether you defined "myhost_com" or "server" in etc/hosts *on the server*.
Does the server have a firewall configuration that lets remote desktop
through but not HTTP?
Does 'netstat -a -p tcp' show a listener on 192.168.1.2:80?
--=20
Mark H. Wood, Lead System Programmer mwood@IUPUI.Edu
Friends don't let friends publish revisable-form documents.
--Yylu36WmvOXNoKYn
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
iEYEAREDAAYFAkti7tQACgkQs/NR4JuTKG8rtACfcgPe+13O6Ay8aOIAKLgO T4bB
piIAoLBxuMnqB3WeZOG4gNrK9NDS07nj
=Z9t8
-----END PGP SIGNATURE-----
--Yylu36WmvOXNoKYn--
Re: hitting apache across home network with hosts file
am 29.01.2010 20:31:06 von Jonesy
On Thu, 28 Jan 2010 14:29:20 -0600, Matthew Smith wrote:
> --0016e6d64956eaf544047e3f60b6
> Content-Type: text/plain; charset=ISO-8859-1
>
> I understand that. I am only trying to access the server from the windows 7
> machine.
>
> To clarify:
> server, 192.168.1.2, running apache
>
> Windows 7 machine, hosts file modified to:
> 192.168.1.2 mysite_com
> Windows 7 machine unable to load http://mysite_com/ in browser.
hmmmm...
Something un-obvious is working against you....
We are webmasters for a number of web sites here.
They are variously example.com , or .net , or .org
In the hosts file on the windows and linux boxen here we have:
192.168.1.35 www.example.tst example.tst
192.168.1.35 www.example2.tst example2.tst
192.168.1.35 www.example3.tst example3.tst
192.168.1.35 www.example4.tst example4.tst
for all the various domains -- pointing to a local box running LAMP
with all the domains replicated thereon. IJFW here.
Perhaps your browser(s) are attempting to be 'helpful' and are adding
the ".com" suffix to the truncated domain name in the location bar? (By
default, most do that.) That would result in a dns lookup failure.
Perhaps the error reporting back to you in the browser is not specific
enough -- telling you it could not find "mysite_com" -- when, indeed, it
could not find "mysite_com.com".
HTH
Jonesy
--
Marvin L Jones | jonz | W3DHJ | linux
38.24N 104.55W | @ config.com | Jonesy | OS/2
* Killfiling google & XXXXbanter.com: jonz.net/ng.htm
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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