[Xitami] Redirecting By IP Address

David Wolever wolever.lists at gmail.com
Wed Apr 19 19:17:03 CEST 2006


And this is the part I hate: When I get baffled by something so stupidly simple.
You were very right: I was assuming that Apache would pass the Host:
header along to the IP address it was contacting.  I guess not.  When
I told it to connect to xitami.example.com (which, internally, points
to 192.168.1.2) everything seems to work fine.

As far as the setup goes, we have one Linux server (that is horribly
over loaded).  It provides Internet to about 30 computers, runs an
Apache server for our external page and runs a virtual machine (with
VMWare) to run Windows.  We need Windows+Xitami because there are a
couple apps written in Perl for Xitami+Windows that don't like to run
on Linux at all (and wading through 10,000 lines of Perl which was
written by a non-programmer is not my idea of fun).

Anyway, it all seems to be working well now.
Thanks again for the help,
David

On 4/19/06, Francis Turner <francis.turner at gmail.com> wrote:
> You need to tell your internal DNS that xitami.example.com is
> 192.168.1.2 and tell your apache server to redirect to
> xitami.example.com not to 192.168.1.2
>
> On 4/19/06, David Wolever <wolever.lists at gmail.com> wrote:
> > I'm not quite sure what you're saying.
> > We only have one external IP address, which is being used by a primay
> > site (hosted by Apache).
> > The secondary site, hosted by Xitami, is on a LAN.  We can not put it
> > any farther out because we do not have another IP address and I do not
> > want to put a Windows machine right on the Internet.
> > The problem lies with the Location header.
> > When a directory is requested with out the trailing slash (eg:
> > example.com/foo instead of example.com/foo/), Xitami does what it
> > should and sends a 302 moved temporally header, trying to redirect the
> > client to /foo/.  The problem is that the Location: used by Xitami is
> > it's IP address, NOT the host supplied by the browser (as, I believe,
> > it should be).
> > Here is what the transaction looks like:
> >
> > Browser:
> > GET /foo HTTP/1.1
> > Host: xitami.example.com
> >
> > Xitami:
> > HTTP/1.0 302 Moved Temporarily
> > Vary: Host
> > Location: http://192.168.1.2/foo/
> >
> > But this is what it should say:
> > HTTP/1.0 301 Moved Permanently
> > Location: http://xitami.example.com/foo/
> >
> > I hope this clarifies things.
> > David
> >
> > On 4/19/06, MRJ InfoTech Admin <admin at mrjdesign.net> wrote:
> > >  Your DNS server should route the traffic
> > >  your Xitami should be on a machine on the outside of your fire walled
> > > router or a DMZ machine
> > >  Then you can skip the double router step of the apache hack.
> > >  All IP to Domain name is routed through, say BIND 9.3 or different DNS
> > > solutions only.
> > >  Xitami only handles Virtual host routes on that same IP to specific
> > > directed domains, still routed with DNS albeit virtual.
> > >
> > >  MRJ
> > >
> > >
> > >
> > >  At 15:58 19/04/2006, you wrote:
> > >
> > >
> > > Hey,
> > >  I've been put in charge of making an Xitami work.  It is running on a
> > >  virtual machine with a local IP address (192.168.10.2), and it's
> > >  mother host is using Apache's mod_proxy to forward requests from the
> > >  outside to Xitami, then send Xitami's response back to the world.
> > >  The problem I'm having is that, in Xitami-generated Location: headers,
> > >  it is using it's IP address (192.168.10.2) instead of it's hostname
> > >  (fs.example.com).  I have set up it's hostname in xitami.cfg and I
> > >  have set the computer's hostname to the same.
> > >  We are not using any sort of virtual hosting and (as far as I know)
> > >  the config is pretty much stock.
> > >  Any help would be much appreciated.
> > >  David
> > >
> > >
> > >  --
> > >  Xitami Users Mailing List -- For Xitami support
> > >  To unsubscribe:
> > > http://lists.xitami.org/mailman/listinfo/xitami
> > >
> > >  (c)1996-2006 - all communication with this account holder is regarded
> > > personal and confidential at all times.
> > >  MRJ Information Technology Ltd. / 35 Camden High St., NW1 7JE, London,
> > > United Kingdom
> > >  http://www.mrjdesign.net or
> > > http://www.mrjinformationtechnology.net
> > >  Please report any abusive messaging through our network, to the email
> > > address abuse at mrjdesign.net
> > >
> > >
> > > --
> > > Xitami Users Mailing List -- For Xitami support
> > > To unsubscribe:
> > > http://lists.xitami.org/mailman/listinfo/xitami
> > >
> > >
> >
> >
> > --
> > Xitami Users Mailing List -- For Xitami support
> > To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
> >
>
>
> --
> http://www.di2.nu/blog.htm
> Faber's Fourth Law:
>   Necessity is the mother of strange bedfellows.
>
>
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
>



More information about the Xitami mailing list