<quote who="[EMAIL PROTECTED]">

> After advice given here, but for other reasons too, I got a adsl-router
> rather than an adsl-bridge to tigger.
> 
> What I've lost is name virtual hosts. My router (dlink 604T) does suitable
> virtual hosting, but all the necessary name information is lost before it
> gets routed to apache2. ie router:80 -> 192.168.1.254:80
> 
> Is there a way of hosting multiple sites with a router?

Your router only forwards to addresses and ports. It knows nothing of the
protocol you're forwarding.

You most likely have a configuration issue on the machine behind your
router. The *client* tells the web server which "Host" name it wants.

Use telnet to check what your web server is doing:

  $ telnet perkypants.org 80
  Trying 70.85.31.216...
  Connected to perkypants.org.
  Escape character is '^]'.
  HEAD / HTTP/1.0

  HTTP/1.1 302 Found
  Date: Mon, 01 Jan 2007 02:18:17 GMT
  Server: Apache/2.0.55 (Ubuntu) PHP/5.1.2
  Location: http://waugh.id.au/
  Connection: close
  Content-Type: text/html; charset=iso-8859-1

(As you can see above, my machine has a sensible default configuration for
no-name requests, which instead of dumping a useless error, redirects to a
relatively useful site.)

Then, check what your web server is doing when the client is actually doing
the right thing (specifically, the Host header):

  $ telnet perkypants.org 80
  Trying 70.85.31.216...
  Connected to perkypants.org.
  Escape character is '^]'.
  HEAD / HTTP/1.0
  Host: perkypants.org

  HTTP/1.1 200 OK
  Date: Mon, 01 Jan 2007 02:22:34 GMT
  Server: Apache/2.0.55 (Ubuntu) PHP/5.1.2
  Last-Modified: Sun, 17 Dec 2006 14:40:02 GMT
  ETag: "1973d-3ee-d711b480"
  Accept-Ranges: bytes
  Content-Length: 1006
  Connection: close
  Content-Type: text/html; charset=UTF-8

- Jeff

-- 
Open CeBIT 2007: Sydney, Australia              http://www.opencebit.com.au/
 
      "Love never misses the chance to put the boot in." - Kelly, SLOU
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to