httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernard Hawkes" <>
Subject Re: [users@httpd] Redirection of external URLs to own file system for offline testing - How? NOT SOLVED
Date Sun, 18 May 2003 17:23:58 GMT
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 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



Had a flash or inspiration/desparation. Tried with a URL of and it's working!



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:-       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
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 "" 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?


----- Original Message -----
From: "Jeff Cohen" <>
To: <>
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
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

<VirtualHost *>
    DocumentRoot c:/apache/odspics

<VirtualHost *>
    DocumentRoot c:/apache/ockdramsoc

And then put the files in the appropriate directory where you specified
to be.

All the best,
Jeff Cohen
Tel. (416) 917-2324
GEJ-IT Networks!

> -----Original Message-----
> From: Bernard Hawkes []
> Sent: Saturday, May 17, 2003 3:30 PM
> To: Apache Users List
> Subject: [users@httpd] Redirection of external URLs to own file system
> 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:-
> Because of space limitations I'm intending to open a second account:-
> to hold a growing library of images.
> I envisage a page on the ockdramsoc site containing html like this:-
> <a href=""
> target="_blank">
> <img
> >
> This will work fine when uploaded but is giving me problems offline. I
> my Apache webserver, whenever it sees "",
> 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
> 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
> I wouldn't say no to a full solution but tell me what directives I need
> 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
> ServerName
> 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:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message