httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernard Hawkes" <Apa...@15ddv.freeserve.co.uk>
Subject Re: [users@httpd] Redirection of external URLs to own file system for offline testing - How? MOSTLY SOLVED
Date Mon, 19 May 2003 19:28:32 GMT
I have a solution I can live with though it's not quite 100%.....

Roy, I'm running IE 5.5 under Windows ME. I have searched Tools => Internet
Options and the Help facility but am unable to locate the setting you
mention.

Jeff, I'm not clear how you intended I should "just disable your network
connections".

What I did was go to Tools => Internet Options => Connections tab and
select "Never dial a connection". This works just fine, except that when I
really do want an Internet connection I have to establish it manually. No
big deal now that I've set up an appropriate shortcut on my Start menu.

Having got this far I played about some more to establish what was and
wasn't necessary to this solution. It turns out that the only change
required is the addition of this single line
127.0.0.1 www.odspics.fsnet.co.uk
to the hosts file. No changes to the httpd.conf are required at all.

The addition of
127.0.0.1 www.ockdramsoc.fsnet.co.uk
to the hosts file is not only unnecessary, it stops me accessing the
on-line site!

The "VirtualHost" entries do no harm but are unnecessary.

So thank-you for taking the time to respond. Without your input I would
never have got to this point.

However, if there was an alternative solution that didn't require the
"Never dial a connection" option......

Bernard.
----------------------------------------------------------------
Bernard,

I had exactly the same problem a few days back when trying to get Apache
1.3
configured to act as a local testing environment ... in that it would
resolve my local URLs correctly only while I was online ...

The solution for me was to change my IE settings to auto-detect network.
After that it worked perfectly.

I have actually taken mine a stage further by defining my local URL as
test.mydomain.tld - this allows me to choose easily between using the local
copy or the published copy simply by going to either test.etc or www.etc
...

Regards,

Roy
------------------------------------------------------------------


When you do "Work Offline" in IE it serves the cached data that has been
downloaded from your history.
When you check it, don't use the "Work Offline" feature, just disable your
network connections and you'll see that it's working.

Jeff Cohen
Jeff@GEJ-IT.com
Tel. (416) 917-2324
www.GEJ-IT.com
GEJ-IT Networks!

> -----Original Message-----
> From: Bernard Hawkes [mailto:Apache@15ddv.freeserve.co.uk]
> Sent: Sunday, May 18, 2003 1:24 PM
> To: Apache Users List
> Subject: Re: [users@httpd] Redirection of external URLs to own file
system
for
> offline testing - How? NOT SOLVED
>
> Sorry, although it looked as though it was working as soon as I went
> offline the behaviour reverted to what had been happening before!
>
> So, although www.odspics.fsnet.co.uk doesn't exist (yet), when I have an
> internet connection present my apache server is correctly redirecting
> references to that URL to my local file system. However, when I'm offline
> an encounter with the URL prompts a request to go on-line! Hopefully this
> additional information is of help. I'm affraid I'm now well out of my
> depth!
>
> Bernard.
>
> -------------------------------------------------------------------------
>
> Had a flash or inspiration/desparation. Tried with a URL of
> http://127.0.0.1/ and it's working!
>
> Bernard.
>
> -------------------------------------------------------------------------
>
> Thanks for the quick response but the problem is not solved. I located
> hosts.sam (God knows why it's a Lotus WordPro document) in C:/Windows (as
> you suggested). It had one existing entry:-
> 127.0.0.1       localhost
> I added the new entries underneath this. I then added (copy/paste) the
two
> VirtualHost entries you suggested and stated Apache. It gave me these
> messages:-
> Warning: DocumentRoot [c:/apache/odspics] does not exist
> Warning: DocumentRoot [c:/apache/ockdramsoc] does not exist
> Started up the browser anyway but "http://localhost" just gets me a 404 -
> "The page cannot be found".
>
> Changed DocumentRoot to "D:/WebsiteODS" and tried again. The site home
page
> now appears. Linked to my test page and the Connection window appears.
> Click on "Work Offline" and the image is not displayed.
>
> Changed the order of entries in the hosts file so that "127.0.0.1
> www.odspics.fsnet.co.uk" was first and tried again. No change.
>
> Renamed the hosts.sam file to hosts (i.e. no extension at all). Tried
> again. No change.
>
> At this point I'm stuck once more. Any further ideas?
>
> Bernard.
>
> ----- Original Message -----
> From: "Jeff Cohen" <support@gej-it.com>
> To: <users@httpd.apache.org>
> Sent: Saturday, May 17, 2003 11:41 PM
> Subject: RE: [users@httpd] Redirection of external URLs to own file
system
> for offline testing - How?
>
>
> Add the following lines into your hosts. file
> 127.0.0.1 www.odspics.fsnet.co.uk
> 127.0.0.1 www.ockdramsoc.fsnet.co.uk
> that should solve your issue with connecting to the internet
automatically.
> Hosts. file is usually in %systemroot% directory such as c:\windows
> One other thing that you'll have to do in order for that to work is to
make
> 2 virtual hosts in your apache, and they should be set like this as an
> example:
>
> <VirtualHost *>
>     DocumentRoot c:/apache/odspics
>     ServerName www.odspics.fsnet.co.uk
> </VirtualHost>
>
> <VirtualHost *>
>     DocumentRoot c:/apache/ockdramsoc
>     ServerName www.ockdramsoc.fsnet.co.uk
> </VirtualHost>
>
> And then put the files in the appropriate directory where you specified
> them
> to be.
>
> All the best,
> Jeff Cohen
> Support@GEJ-IT.com
> Tel. (416) 917-2324
> www.GEJ-IT.com
> GEJ-IT Networks!
>
> > -----Original Message-----
> > From: Bernard Hawkes [mailto:Apache@15ddv.freeserve.co.uk]
> > Sent: Saturday, May 17, 2003 3:30 PM
> > To: Apache Users List
> > Subject: [users@httpd] Redirection of external URLs to own file system
> for
> offline
> > testing - How?
> >
> > Possibly not relevant, but I'm running under Windows ME.
> > I'm running Apache web server version 2.0.45.
> > I'm running in console mode.
> > The only use I will be putting it to is to test my website offline.
> > My website is hosted by freeserve, to be precise:-
> > http://www.ockdramsoc.fsnet.co.uk
> > Because of space limitations I'm intending to open a second account:-
> > http://www.odspics.fsnet.co.uk
> > to hold a growing library of images.
> >
> > I envisage a page on the ockdramsoc site containing html like this:-
> > <a href="http://www.odspics.fsnet.co.uk/previous/1995a/pic1-full.jpg"
> > target="_blank">
> > <img
> >
>
src="http://www.odspics.fsnet.co.uk/previous/1995a/pic1-thumb.jpg"</img></a
> > >
> >
> > This will work fine when uploaded but is giving me problems offline. I
> want
> > my Apache webserver, whenever it sees
"http://www.odspics.fsnet.co.uk/",
> to
> > look in my own file system rather than try to connect to the Internet.
> >
> > I have spent several hours looking at the documentation on the Apache
> site
> > without any success. I had a look at "Redirect" and "VirtualHost" but
> > either I'm on the wrong lines, there's other things that need setting
or
> > I'm not using them correctly. (Probably all three as I'm very new to
> this.)
> > I wouldn't say no to a full solution but tell me what directives I need
> to
> > set and I'll have a go at working out the rest from the manual.
> >
> > I've hardly touched httpd.conf. Things I've set are:-
> > DocumentRoot "D:/WebsiteODS"
> > DirectoryIndex home.htm
> > ServerAdmin webmaster@ockdramsoc.fsnet.co.uk
> > ServerName bernard2.ockdramsoc.fsnet.co.uk:80
> >
> > This configuration is mostly working. I type in a URL of
http://localhost
> > into my browser and my site appears as I would expect it to. The only
> > problem I have is with external URLs.
> >
> > Bernard.
>
>
> ---------------------------------------------------------------------
> 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



---------------------------------------------------------------------
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


Mime
View raw message