You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Robert Andersson <ro...@profundis.nu> on 2003/09/24 15:34:14 UTC
Re: [users@httpd] help needed on multiple domain root directories ver 1.3.28 Win32
Webmaster wrote:
> okay, what is the correct syntax to use for the host:header please?
host_header := "Host: " hostname CR LF
Don't worry about that. When you type "http://www.somehost.com/" in you
browser, it will lookup the IP of "www.somehost.com", connect to port 80 on
that IP and send an HTTP request. Included in that request, if it is
HTTP/1.1, must be a host header, which the browser sets from the host in the
URI you gave it.
> Well, I am unable to "dial out" through the router and come back in to see
> either the xxxxx.dyndns.org addresses or the 150.x.x.x IP
I thought you said that you could connect using eagles-lair.dyndns.org?
> you can't ever see your own server from the "outside".
Not really the case. A quick & dirty way for you to make them accesible in
your LAN is to modify each computer's hosts file to resolve to your internal
IP address. On Windows you will find this in
%WinDir%/system32/drivers/etc/hosts. Just add a few rows in it:
eagles-lair.dyndns.org 192.168.0.2
*.eagles-lair.dyndns.org 192.168.0.2
warrinavalley.dyndns.org 192.168.0.2
*.warrinavalley.dyndns.org 192.168.0.2
Regards,
Robert Andersson
---------------------------------------------------------------------
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
[users@httpd] Re: help needed on multiple domain root directories ver 1.3.28 Win32
Posted by Zuri <zi...@hotmail.com>.
Change the name from "hosts.sam" to just "hosts"?
zig.@.zuri
"Webmaster" <ea...@chatministries.org> wrote in message
news:3.0.6.32.20030926124359.00804c60@mail.internode.on.net...
> Robert,,
>
> I have located a hosts.sam file in C:\Windows
> It had just the one entry in it as
> 127.0.0.1 localhost
>
> So, I added your suggestions as per the following...
> 127.0.0.1 localhost
> 192.168.0.2 eagles-lair.dyndns.org
> 192.168.0.2 *.eagles-lair.dyndns.org
> 192.168.0.2 warrinavalley.dyndns.org
> 192.168.0.2 *.warrinavalley.dyndns.org
>
> Unfortunately it didn't work - either with or without the lines with a *
>
> I did exactly the same thing with /etc/hosts in QNX 6.2.0 and it works
fine.
> So it appears to be a limitation of Windows98 (Second Edition)
>
> Thank you very much for your help.
> If you can think of any other work-around, it would be much appreciated :)
>
> Richard Ashton
>
>
>
> At 15:34 24-09-03 +0200, you wrote:
> ---snip---
> >Not really the case. A quick & dirty way for you to make them accesible
in
> >your LAN is to modify each computer's hosts file to resolve to your
internal
> >IP address. On Windows you will find this in
> >%WinDir%/system32/drivers/etc/hosts. Just add a few rows in it:
> >
> > eagles-lair.dyndns.org 192.168.0.2
> > *.eagles-lair.dyndns.org 192.168.0.2
> > warrinavalley.dyndns.org 192.168.0.2
> > *.warrinavalley.dyndns.org 192.168.0.2
> >
> ---snip---
>
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain root directories ver
1.3.28 Win32
Posted by Brian Dessent <br...@dessent.net>.
Webmaster wrote:
>
> Robert,,
>
> I have located a hosts.sam file in C:\Windows
> It had just the one entry in it as
> 127.0.0.1 localhost
>
> So, I added your suggestions as per the following...
> 127.0.0.1 localhost
> 192.168.0.2 eagles-lair.dyndns.org
> 192.168.0.2 *.eagles-lair.dyndns.org
> 192.168.0.2 warrinavalley.dyndns.org
> 192.168.0.2 *.warrinavalley.dyndns.org
>
> Unfortunately it didn't work - either with or without the lines with a *
>
> I did exactly the same thing with /etc/hosts in QNX 6.2.0 and it works fine.
> So it appears to be a limitation of Windows98 (Second Edition)
Wildcards aren't supported in the 'hosts' file... Not that it really
affects you (since it doesn't work without them.)
Brian
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain root
directories ver 1.3.28 Win32
Posted by Webmaster <ea...@chatministries.org>.
Thanks Jeff and Leif,
Looks like some Windows experts know more than others!
Ummmm... That's why I asked in THIS LIST, where you would expect those "in
the know" would be found <g>
Until now I've always had other people do the actual hosting of pages for
me; and this suggests WHY that's what usually happens in the community!
My recent foray into getting wet toes dabbling with a web server shows me
that it is "not all beer and skittles" - a UK expression - whether or not
the beer is "free" as Robert just mentioned!
<wide grinz>
Richard
At 10:59 26-09-03 -0500, you wrote:
---snip---
>
>Really, undocumented?
>
>Below is a lot of reading on Networking
>and Windows 98.
>
>Welcome to the MS Windows 98 Resource Kit
>http://www.microsoft.com/technet/prodtechnol/win98/reskit/win98rk.asp
>http://www.microsoft.com/technet/prodtechnol/win98/reskit/wrkint.asp
>
>For more information about creating and editing Hosts
>and LMHosts files, see Appendix F,
>"Hosts and LMHosts Files for Windows 98."
>http://www.microsoft.com/technet/prodtechnol/win98/reskit/part7/wrkappf.asp
>http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtech
nol/win98/reskit/part7/wrkappf.asp?frame=true
>
>How to Troubleshoot Basic TCP/IP Problems
>http://support.microsoft.com/default.aspx?scid=kb;en-us;169790
>
>And others on the Internet.
>
>Creating and testing a HOSTS file for name resolution
>http://www.iisfaq.com/default.aspx?View=A471&P=139
>
>Windows 95's HOSTS File
>http://www.tcimet.net/support/hostsfil.htm
>
>APACHE / Win98 / Virtual Hosts.
>http://forums.devshed.com/archive/15/2001/09/2/21760
>
>How do I change my hosts file? Or, how can I see my
>domain before DNS changes propagate?
>http://www.modwest.com/help/kb8-52.html
>
>Apache Virtual Hosts I
>http://www.desilva.biz/apache/virtual.html
>
> Jeff
>
>
>
>
>
>
>---------------------------------------------------------------------
>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
>
>
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain root directories ver 1.3.28 Win32
Posted by Jeff White <jl...@earthlink.net>.
From: "Webmaster"
>
> Same problem, exactly, even after altering the hosts file.
>
> I then changed its filename to "hosts" - without an extension.
Bingo!
>
> I then did the same to the Aptiva and this HP Vectra. Bingo!
>
> I had previously discussed this with a guy who yesterday passed the
> Microsoft support engineer examination - he didn't know of a
solution - so
> this must be an undocumented thing.
>
> One has to ask WHY name the file HOSTS.SAM when it will only work
with the
> name of HOSTS
>
> Sincerely
> Richard Ashton
> Adelaide, South Australia
>
Really, undocumented?
Below is a lot of reading on Networking
and Windows 98.
Welcome to the MS Windows 98 Resource Kit
http://www.microsoft.com/technet/prodtechnol/win98/reskit/win98rk.asp
http://www.microsoft.com/technet/prodtechnol/win98/reskit/wrkint.asp
For more information about creating and editing Hosts
and LMHosts files, see Appendix F,
"Hosts and LMHosts Files for Windows 98."
http://www.microsoft.com/technet/prodtechnol/win98/reskit/part7/wrkappf.asp
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/win98/reskit/part7/wrkappf.asp?frame=true
How to Troubleshoot Basic TCP/IP Problems
http://support.microsoft.com/default.aspx?scid=kb;en-us;169790
And others on the Internet.
Creating and testing a HOSTS file for name resolution
http://www.iisfaq.com/default.aspx?View=A471&P=139
Windows 95's HOSTS File
http://www.tcimet.net/support/hostsfil.htm
APACHE / Win98 / Virtual Hosts.
http://forums.devshed.com/archive/15/2001/09/2/21760
How do I change my hosts file? Or, how can I see my
domain before DNS changes propagate?
http://www.modwest.com/help/kb8-52.html
Apache Virtual Hosts I
http://www.desilva.biz/apache/virtual.html
Jeff
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain
rootdirectories ver 1.3.28 Win32
Posted by Webmaster <ea...@chatministries.org>.
That makes sense, Brian. Pity they didnt document it though <g>
As I mentioned I have a friend stateside who just passed his MSCE (are
those the right letters?) examination and it didn't ring a bell with him.
Just goes to show the mass mulling of minds on a list can work wonders :)
Richard
At 00:49 26-09-03 -0700, you wrote:
>Webmaster wrote:
>
>> One has to ask WHY name the file HOSTS.SAM when it will only work with the
>> name of HOSTS
>
>Because it's a SAMple of what a valid HOSTS file might look like.
>Additionally, the HOSTS file is usually not necessary in all but a few
>exceptional circumstances, and so it's more efficient for the OS if
>there's no such file there by default.
>
>One principle that people tend to try to stick to when writing software
>that installs files is to never overwrite a users configuration. It
>would really suck if, for example, you had a lot of stuff in your HOSTS
>file, and then you installed some kind of fixpack/service pack/update
>that replaced that file with the stock one because the stock defaults
>had changed slightly. Many BSD/Linux packages do this by calling files
>e.g. "http.conf-dist" or something similar, so that the distribution
>version never overwrites your actual config.
>
>Brian
>
>---------------------------------------------------------------------
>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
>
>
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain root directories ver 1.3.28 Win32
Posted by Leif W <wa...@usa.net>.
----- Original Message -----
From: "Webmaster" <ea...@chatministries.org>
To: <us...@httpd.apache.org>
Sent: Friday, September 26, 2003 4:04 AM
Subject: Re: [users@httpd] help needed on multiple domain root directories
ver 1.3.28 Win32
> One has to ask WHY name the file HOSTS.SAM when it will only work with the
> name of HOSTS
With the 8.3 filename limitation, HOSTS.SAM is the shortened form of
HOSTS.SAMPLE. Windows by default is set up not to use a hosts file at all,
and only includes a sample file. Funny that even the guy who passed the
elite examinations didn't know this basic factoid. ^^
Leif
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain
rootdirectories ver 1.3.28 Win32
Posted by Webmaster <ea...@chatministries.org>.
Robert
Maybe its because the M$ folk still have this fixation of stand-alone
PCs... you don't *reeeely* need localhost in that situation, do you?
Richard
At 09:57 26-09-03 +0200, you wrote:
>Brian Dessent wrote:
>> Because it's a SAMple of what a valid HOSTS file might look like.
>> Additionally, the HOSTS file is usually not necessary in all but a few
>> exceptional circumstances, and so it's more efficient for the OS if
>> there's no such file there by default.
>
>I would have thought the hosts file was required. How does it otherwise know
>to resolve "localhost", which should be in this file? Oh well, assuming the
>normal brilliance of Microsoft products, I guess "127.0.0.1 localhost" is
>hardcoded in the OS' resolver code.
>
>Regards,
>Robert Andersson
>
>
>---------------------------------------------------------------------
>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
>
>
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain rootdirectories ver 1.3.28 Win32
Posted by Robert Andersson <ro...@profundis.nu>.
Brian Dessent wrote:
> Because it's a SAMple of what a valid HOSTS file might look like.
> Additionally, the HOSTS file is usually not necessary in all but a few
> exceptional circumstances, and so it's more efficient for the OS if
> there's no such file there by default.
I would have thought the hosts file was required. How does it otherwise know
to resolve "localhost", which should be in this file? Oh well, assuming the
normal brilliance of Microsoft products, I guess "127.0.0.1 localhost" is
hardcoded in the OS' resolver code.
Regards,
Robert Andersson
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain rootdirectories ver
1.3.28 Win32
Posted by Brian Dessent <br...@dessent.net>.
Webmaster wrote:
> One has to ask WHY name the file HOSTS.SAM when it will only work with the
> name of HOSTS
Because it's a SAMple of what a valid HOSTS file might look like.
Additionally, the HOSTS file is usually not necessary in all but a few
exceptional circumstances, and so it's more efficient for the OS if
there's no such file there by default.
One principle that people tend to try to stick to when writing software
that installs files is to never overwrite a users configuration. It
would really suck if, for example, you had a lot of stuff in your HOSTS
file, and then you installed some kind of fixpack/service pack/update
that replaced that file with the stock one because the stock defaults
had changed slightly. Many BSD/Linux packages do this by calling files
e.g. "http.conf-dist" or something similar, so that the distribution
version never overwrites your actual config.
Brian
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain root
directories ver 1.3.28 Win32
Posted by Webmaster <ea...@chatministries.org>.
This is very interesting... and thankyou to the three of you who have
stepped me through this totally foreign thinking!
Results of the ping and traceroute from this machine to the one where the
server is located... also running the same version of 98SE from the same CD
(a sales Partner Version that was permitted at that time to be installed on
two machines). Both machines are HP Vectra VL series 8 PIIs.
The other machine that wouldn't see it is a considerably younger IBM Aptiva
with its own customised OEM version of W98SE.
Fri 26-09-2003 C:\WINDOWS>ping warrinavalley.dyndns.org
Pinging warrinavalley.dyndns.org [150.101.106.134] with 32 bytes of data:
Reply from 150.101.106.134: bytes=32 time=1ms TTL=30
Reply from 150.101.106.134: bytes=32 time=1ms TTL=30
Reply from 150.101.106.134: bytes=32 time=1ms TTL=30
Reply from 150.101.106.134: bytes=32 time=1ms TTL=30
Ping statistics for 150.101.106.134:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
Fri 26-09-2003 C:\WINDOWS>tracert warrinavalley.dyndns.org
Tracing route to warrinavalley.dyndns.org [150.101.106.134]
over a maximum of 30 hops:
1 1 ms 1 ms 1 ms warrinavalley.dyndns.org [150.101.106.134]
Trace complete.
Fri 26-09-2003 C:\WINDOWS>ping eagles-lair.dyndns.org
Pinging eagles-lair.dyndns.org [150.101.106.134] with 32 bytes of data:
Reply from 150.101.106.134: bytes=32 time=1ms TTL=30
Reply from 150.101.106.134: bytes=32 time=1ms TTL=30
Reply from 150.101.106.134: bytes=32 time=1ms TTL=30
Reply from 150.101.106.134: bytes=32 time=1ms TTL=30
Ping statistics for 150.101.106.134:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
Fri 26-09-2003 C:\WINDOWS>tracert eagles-lair.dyndns.org
Tracing route to eagles-lair.dyndns.org [150.101.106.134]
over a maximum of 30 hops:
1 1 ms 1 ms 1 ms eagles-lair.dyndns.org [150.101.106.134]
Trace complete.
The story gets more dramatic. I checked my wife's 18-month old IBM Thinkpad
(preloaded with Win ME - shudder!!)
Same problem, exactly, even after altering the hosts file.
I then changed its filename to "hosts" - without an extension. Bingo!
I then did the same to the Aptiva and this HP Vectra. Bingo!
I had previously discussed this with a guy who yesterday passed the
Microsoft support engineer examination - he didn't know of a solution - so
this must be an undocumented thing.
One has to ask WHY name the file HOSTS.SAM when it will only work with the
name of HOSTS
Again, many thank-you's folks. I think I might document the details on one
of my websites so that others don't fall into this trap - or if they do,
they can find the solution.
Sincerely
Richard Ashton
Adelaide, South Australia
PS If I may I'll keep reading this list for a while. Hope the two
suggestions I offered were valid :)
At 07:04 26-09-03 +0200, you wrote:
---snip---
>Well, it *should* work. Even in Windows 98! As Brian suggested, you probably
>can't have the wild-cards there; I just had this vague memory of it being
>supported.
>
>I don't know why your file is named "hosts.sam"; it should be just "HOSTS"
>(as Zuri also pointed out). Try give it correct name, and you will probably
>also need a reboot (we're talking Windows here ;).
>
>What do happen when you try to access eg. warrinavalley.dyndns.org? Try to
>nslookup, traceroute or ping, it.
>
>If you aren't sure what goes wrong, or at which point, you might find a
>sniffer (http://www.ethereal.com/) helpful, to see where stuff is travelling
>to.
>
>Other solutions might involve using your Apache box as a local proxy, which
>you might be able to tweak to deliver your local sites. I don't have much
>experience with proxies, so I cannot say exactly how, though.
>
>Regards,
>Robert Andersson
>
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain root directories ver 1.3.28 Win32
Posted by Robert Andersson <ro...@profundis.nu>.
Webmaster wrote:
> I have located a hosts.sam file in C:\Windows
> It had just the one entry in it as
> 127.0.0.1 localhost
>
> So, I added your suggestions as per the following...
> 127.0.0.1 localhost
> 192.168.0.2 eagles-lair.dyndns.org
> 192.168.0.2 *.eagles-lair.dyndns.org
> 192.168.0.2 warrinavalley.dyndns.org
> 192.168.0.2 *.warrinavalley.dyndns.org
>
> Unfortunately it didn't work - either with or without the lines with a *
Well, it *should* work. Even in Windows 98! As Brian suggested, you probably
can't have the wild-cards there; I just had this vague memory of it being
supported.
I don't know why your file is named "hosts.sam"; it should be just "HOSTS"
(as Zuri also pointed out). Try give it correct name, and you will probably
also need a reboot (we're talking Windows here ;).
What do happen when you try to access eg. warrinavalley.dyndns.org? Try to
nslookup, traceroute or ping, it.
If you aren't sure what goes wrong, or at which point, you might find a
sniffer (http://www.ethereal.com/) helpful, to see where stuff is travelling
to.
Other solutions might involve using your Apache box as a local proxy, which
you might be able to tweak to deliver your local sites. I don't have much
experience with proxies, so I cannot say exactly how, though.
Regards,
Robert Andersson
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain root
directories ver 1.3.28 Win32
Posted by Webmaster <ea...@chatministries.org>.
Robert,,
I have located a hosts.sam file in C:\Windows
It had just the one entry in it as
127.0.0.1 localhost
So, I added your suggestions as per the following...
127.0.0.1 localhost
192.168.0.2 eagles-lair.dyndns.org
192.168.0.2 *.eagles-lair.dyndns.org
192.168.0.2 warrinavalley.dyndns.org
192.168.0.2 *.warrinavalley.dyndns.org
Unfortunately it didn't work - either with or without the lines with a *
I did exactly the same thing with /etc/hosts in QNX 6.2.0 and it works fine.
So it appears to be a limitation of Windows98 (Second Edition)
Thank you very much for your help.
If you can think of any other work-around, it would be much appreciated :)
Richard Ashton
At 15:34 24-09-03 +0200, you wrote:
---snip---
>Not really the case. A quick & dirty way for you to make them accesible in
>your LAN is to modify each computer's hosts file to resolve to your internal
>IP address. On Windows you will find this in
>%WinDir%/system32/drivers/etc/hosts. Just add a few rows in it:
>
> eagles-lair.dyndns.org 192.168.0.2
> *.eagles-lair.dyndns.org 192.168.0.2
> warrinavalley.dyndns.org 192.168.0.2
> *.warrinavalley.dyndns.org 192.168.0.2
>
---snip---
---------------------------------------------------------------------
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
Re: [users@httpd] How to rewrite URL if substitue file exists?
Posted by Robert Andersson <ro...@profundis.nu>.
dev/null wrote:
> Not all the pages have equivalent php pages, or we could roughly do this:
>
> RewriteRule (.*).html$ $1.php
The easiest way is to let PHP also parse .html files, ie:
AddType application/x-httpd-php .php .html
And let all the files retain their original filenames, even if you have
inserted PHP code in them. There is a performance (and bandwidth) penalty
here, though, which may or may not be tolerable.
> for file (.*).html if $1.php exists, rewrite, otherwise let the html page
be
> used.
I'm not good at mod_rewrite, but this may (or may not) work:
RewriteEngine On
RewriteCond %{REQUEST_URI} \.html$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)\.html $1.php
That is, if the requested file was an .html (prevents endless loops), and
that file doesn't exist, change extension to .php.
Regards,
Robert Andersson
---------------------------------------------------------------------
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
[users@httpd] How to rewrite URL if substitue file exists?
Posted by /dev/null <de...@BeginThread.com>.
apache 1.3.27
I've played around with internal rewrites in the past, but it was always "if
the url is z, make it a". This time it's a little different.
Basically I have a tool that spits out our HTML pages, builds navigation
links, etc... But it can only do it with HTML pages. A couple of our pages
are php. Well, we build the "shell" html page and let the navigation get
built with that, then we pull the resulting HTML into our php file and
insert the php code where it goes. We've got it all automated, so it works
nice.
Not all the pages have equivalent php pages, or we could roughly do this:
RewriteRule (.*).html$ $1.php
And we don't want to build ever php rewrite rule by hand, because any time
we took a php page in or out we'd have to edit the httpd.conf and restart
the server. If we did want to do it, it would look something like this:
RewriteRule /firstpage.html firstpage.php
RewriteRule /secondpage.html secondpage.php
RewriteRule /thirdpage.html thirdpage.php
Instead what we want is something like this (but don't know how to do it):
for file (.*).html if $1.php exists, rewrite, otherwise let the html page be
used.
That way all the nav links will all work fine and from the user's
perspective only html pages are being served up.
Thanks for any help!
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain root directories ver 1.3.28 Win32
Posted by Robert Andersson <ro...@profundis.nu>.
Webmaster wrote:
> I have the system32/drivers directory... there is no subdirectory off
it...
> [...]
> I suspect that is an NT/2000/XP configuration thing. I'm running W98SE
Uhm, it seems so. A search revieled that it should be located in the Windows
directory, eg. c:\windows\hosts
> although the aim is to move it all perhaps a month or so to a Linux or
> QNX box but I'm assuming the configuration will be fairly similar.
Yes, the problem here is the clients rather than the server.
You could also consider running your own (local) DNS, so that your LAN
computers can resolve your hostnames to their private IPs. That can be
tricky business, though.
> In an email you wrote to someone else around this time I saw the
following,
> and wonder if I can adapt it for my own use, perhaps, changing the port
> number to 80 presumably?
Not really the same problem. The problem for you is that you cannot use
hostnames, because they resolve to a public IP (which your router can't deal
with), and if you use the private IP, Apache cannot determine which host to
serve from.
An ugly workaround, could be something like this:
Listen 80
Listen 81
Listen 82
NameVirtualHost *
<VirtualHost *:80>
ServerName eagles-lair.dyndns.org
...
</VirtualHost>
<VirtualHost *:80 *:81>
ServerName warrinavalley.dyndns.org
...
</VirtualHost>
<VirtualHost *:80 *:82>
ServerName anotherhost.dyndns.org
...
</VirtualHost>
I have not tested anything like that, but I think it would work. Hopefully
it would work normally from outside, but also enable you to access the other
sites from within your LAN by using its private IP and append the port
number (except for the first vhost). Like this (although the port is
redundant in the first case):
http://192.168.0.2:80/ --> eagles-lair.dyndns.org
http://192.168.0.2:81/ --> warrinavalley.dyndns.org
http://192.168.0.2:82/ --> anotherhost.dyndns.org
If it seems cryptic, read the docs on Virtual Host matching:
http://httpd.apache.org/docs-2.0/vhosts/details.html
You could also give the sites their own private IPs in a similar way.
Regards,
Robert Andersson
---------------------------------------------------------------------
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
Re: [users@httpd] help needed on multiple domain root
directories ver 1.3.28 Win32
Posted by Webmaster <ea...@chatministries.org>.
Robert,
I have the system32/drivers directory... there is no subdirectory off it...
and I have been looking to see if any IP block of numbers appears in any of
the ini files in that general area, but no, can't find one.
I suspect that is an NT/2000/XP configuration thing. I'm running W98SE btw.
although the aim is to move it all perhaps a month or so to a Linux or QNX
box but I'm assuming the configuration will be fairly similar.
In an email you wrote to someone else around this time I saw the following,
and wonder if I can adapt it for my own use, perhaps, changing the port
number to 80 presumably?
>In order to have two namebased vhosts on the same IP and port 3340, you'll
>need to have this in your httpd.conf:
>
> Listen 3340
> NameVirtualHost *:3340
> <VirtualHost *:3340>
> ServerName yourhost1
> ...
> </VirtualHost>
> <VirtualHost *:3340>
> ServerName yourhost2
> ...
> </VirtualHost>
>
Richard
At 15:34 24-09-03 +0200, you wrote:
>Webmaster wrote:
---snip---
>Not really the case. A quick & dirty way for you to make them accesible in
>your LAN is to modify each computer's hosts file to resolve to your internal
>IP address. On Windows you will find this in
>%WinDir%/system32/drivers/etc/hosts. Just add a few rows in it:
>
> eagles-lair.dyndns.org 192.168.0.2
> *.eagles-lair.dyndns.org 192.168.0.2
> warrinavalley.dyndns.org 192.168.0.2
> *.warrinavalley.dyndns.org 192.168.0.2
>
>Regards,
>Robert Andersson
>
>
>---------------------------------------------------------------------
>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
>
>
---------------------------------------------------------------------
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