Setting up LocalHost and LocalNet
Micha <[email protected]> Tue, 8 Aug 2006 00:43:48 +0200
| Newsgroups | gmane.network.wwwoffle.user |
|---|---|
| Message-ID | <20060808004348.54f06f45@woody> |
| The first listed host in the Localhost section of the configuration
| file is used in the URLs that are created by some of the internal
| WWWOFFLE web-pages. This means that if you use them in the order that
| you suggest you will see URLs like 'http://127.0.0.1:8080/...' which
| will only work from one machine (the one running WWWOFFLE) and not
| other machines on the network.
ok.
| Obviously if you only have one machine on the network then this is not
| a problem. But if you only had one machine you wouldn't need two IP
| addresses.
Now i tried another thing, 'woody.lan1`as first entry.
This worked well from other hosts (with host alias definitions).
However, on the the wwwoffled box itself, browser (firefox) doesn't finish loading,
even though all content is delivered (afaics), the connection doesn't seem to get closed.
It appears also that the cache-info doesn't come up though the option is checked.
Here's the life-http-header from firefox, with wwwoffle online:
_______________________________________________
http://www.de.debian.org/
GET / HTTP/1.1
Host: www.de.debian.org
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 (Debian-1.5.dfsg+1.5.0.6-1)
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.7,en;q=0.5,es-es;q=0.3,es;q=0.2
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-15,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
If-Modified-Since: Mon, 07 Aug 2006 01:32:21 GMT
If-None-Match: "10048825-403a-730a9340"
Cache-Control: max-age=0
HTTP/1.x 200 OK
Date: Mon, 07 Aug 2006 21:15:26 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2
Content-Location: index.de.html
Vary: negotiate,accept-language
TCN: choice
Last-Modified: Mon, 07 Aug 2006 01:32:21 GMT
Etag: "10048825-403a-730a9340"
Accept-Ranges: bytes
Content-Type: text/html
Content-Language: de-lu
Connection: close
Proxy-Connection: close
Content-Encoding: gzip
Transfer-Encoding: chunked
----------------------------------------------------------
http://www.de.debian.org/debian.css
GET /debian.css HTTP/1.1
Host: www.de.debian.org
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 (Debian-1.5.dfsg+1.5.0.6-1)
Accept: text/css,*/*;q=0.1
Accept-Language: de-de,de;q=0.8,en-us;q=0.7,en;q=0.5,es-es;q=0.3,es;q=0.2
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-15,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.de.debian.org/
If-Modified-Since: Tue, 23 May 2006 17:30:42 GMT
If-None-Match: "10079513-295b-fa6db480"
Cache-Control: max-age=0
HTTP/1.x 200 OK
Date: Mon, 07 Aug 2006 21:15:29 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2
Last-Modified: Tue, 23 May 2006 17:30:42 GMT
Etag: "10079513-295b-fa6db480"
Accept-Ranges: bytes
Content-Type: text/css
Connection: close
Proxy-Connection: close
Content-Encoding: gzip
Transfer-Encoding: chunked
----------------------------------------------------------
http://www.de.debian.org/debian-de.css
GET /debian-de.css HTTP/1.1
Host: www.de.debian.org
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 (Debian-1.5.dfsg+1.5.0.6-1)
Accept: text/css,*/*;q=0.1
Accept-Language: de-de,de;q=0.8,en-us;q=0.7,en;q=0.5,es-es;q=0.3,es;q=0.2
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-15,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.de.debian.org/
If-Modified-Since: Sat, 11 Mar 2006 02:34:34 GMT
If-None-Match: "10079433-511-f330c280"
Cache-Control: max-age=0
HTTP/1.x 200 OK
Date: Mon, 07 Aug 2006 21:15:30 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2
Last-Modified: Sat, 11 Mar 2006 02:34:34 GMT
Etag: "10079433-511-f330c280"
Accept-Ranges: bytes
Content-Type: text/css
Connection: close
Proxy-Connection: close
Content-Encoding: gzip
Transfer-Encoding: chunked
----------------------------------------------------------
http://www.de.debian.org/logos/openlogo-nd-50.png
GET /logos/openlogo-nd-50.png HTTP/1.1
Host: www.de.debian.org
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 (Debian-1.5.dfsg+1.5.0.6-1)
Accept: image/png,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.7,en;q=0.5,es-es;q=0.3,es;q=0.2
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-15,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.de.debian.org/
If-Modified-Since: Wed, 02 Jan 2002 22:22:19 GMT
If-None-Match: "31208-2f7-4f8dfcc0"
Cache-Control: max-age=0
HTTP/1.x 200 OK
Date: Mon, 07 Aug 2006 21:15:31 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2
Last-Modified: Wed, 02 Jan 2002 22:22:19 GMT
Etag: "31208-2f7-4f8dfcc0"
Accept-Ranges: bytes
Content-Type: image/png
Connection: close
Proxy-Connection: close
Transfer-Encoding: chunked
----------------------------------------------------------
http://www.de.debian.org/Pics/debian.png
GET /Pics/debian.png HTTP/1.1
Host: www.de.debian.org
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 (Debian-1.5.dfsg+1.5.0.6-1)
Accept: image/png,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.7,en;q=0.5,es-es;q=0.3,es;q=0.2
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-15,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.de.debian.org/
If-Modified-Since: Tue, 02 Nov 2004 00:09:48 GMT
If-None-Match: "60073d08-113c-57dbab00"
Cache-Control: max-age=0
HTTP/1.x 200 OK
Date: Mon, 07 Aug 2006 21:15:31 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2
Last-Modified: Tue, 02 Nov 2004 00:09:48 GMT
Etag: "60073d08-113c-57dbab00"
Accept-Ranges: bytes
Content-Type: image/png
Connection: close
Proxy-Connection: close
Transfer-Encoding: chunked
----------------------------------------------------------
http://www.de.debian.org/sponsor_img.jpg
GET /sponsor_img.jpg HTTP/1.1
Host: www.de.debian.org
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 (Debian-1.5.dfsg+1.5.0.6-1)
Accept: image/png,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.7,en;q=0.5,es-es;q=0.3,es;q=0.2
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-15,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.de.debian.org/
If-Modified-Since: Tue, 03 Nov 1998 07:55:45 GMT
If-None-Match: "1007980e-961-73eb0240"
Cache-Control: max-age=0
HTTP/1.x 200 OK
Date: Mon, 07 Aug 2006 21:15:31 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2
Last-Modified: Tue, 03 Nov 1998 07:55:45 GMT
Etag: "1007980e-961-73eb0240"
Accept-Ranges: bytes
Content-Type: image/jpeg
Connection: close
Proxy-Connection: close
Transfer-Encoding: chunked
_______________________________________________
It's working always ok if i set only 'woody' as the first entry.
'woody' is an alias for localhost 127.0.0.1 on this box.
There's no such delay when i reload in wwwoffle-offline mode,
and the same page seems to be complete.
Since i set hostaliases on other win boxes too, 'woody:8080' also
is ok there.
Here are some relevant config sections:
(I've no header censoring and no proxy)
bind-ipv4 = 0.0.0.0
socket-timeout = 100
dns-timeout = 30
connect-timeout = 30
connect-retry = yes
reply-compressed-data = yes
reply-chunked-data = yes
request-chunked-data = yes
validate-with-etag = yes
request-conditional = yes
pragma-no-cache = yes
cache-control-no-cache = yes
cache-control-max-age-0 = yes
cookies-force-refresh = yes
request-expired = yes
request-changed-once = no
request-no-cache = yes
request-changed = 0
request-conditional = yes
request-redirection = no
try-without-password = no
keep-cache-if-not-found = yes
intr-download-keep = yes
intr-download-size = 1
intr-download-percent = 50
timeout-download-keep = yes
request-compressed-data = yes
LocalHost
{
woody # this works, where woody.lan1 doesn't finish connection (no cache-info)
localhost
127.0.0.1
woody.lan1
192.168.1.33
ip6-localhost
::ffff:127.0.0.1
::1
}
When i connect to wwwoffled from another box via cable,
traffic flows through a switch connected to the router.
In this case (cable connection) i'd expect the switch to exchange packets
directly between the boxes (like ptp) am i right ? I admit never tested this,
since router firewall is configured to let anything hit my main box unfiltered.
This one runs sophisticated iptables which are rather open though,
doing merely detailed logging. I'm just curious ;)
( Running servers are paranoid configured, of course.)