SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

*** xtm ***

*** installation ***

tested on:

        debian sarge, debian etch
        i686, x86_64
need

apt-get install libpcre3-dev apt-get install libexpat-dev apt-get install libevent-dev

if ssl:

apt-get install libssl-dev

if javascript:

apt-get install libsmjs-dev

./configure --with-ssl --with-smjs --prefix=/usr/local/xtm make
make install

vi /usr/local/xtm/etc/xtm.conf

/usr/local/xtm/bin/xtm.init start

*** configuration ***

<?xml version="1.0" encoding="iso-8859-1"?> <xtm-config>

<global>

        <!-- just dont change ;) threads = number of processors -->
        <emp dbufsize="4K" dbufcnt="256" threads="1" bufferhigh="512K" bufferlow="8K" />
        <!-- just dont change ;) -->
        <http reqheadersize="32K" reqheadertimeout="60" />
        <!-- enable caching -->
        <cache size="6G" maxelementsize="8M" timeout="15m" />
        <!-- use ssl engine (remove x- to enable) -->
        <ssl x-engine="foo" />
        <!-- control addr and key. CHANGE THE KEY -->
        <control addr="0.0.0.0:8881" key="CHANGEME" />
        <!-- user/group to run, enable core dump, ulimit -n 128k, create pidfile -->
        <sys maxfd="128K" core="2G" pidfile="xtm.pid" user="nobody" group="nogroup" />

</global>

<!-- create pool "pool1", enable dynratio (if dynratio script is run), schedule by least connections --> <pool name="pool1" dynratio-enable="true" algorithm="connections">

        <member addr="www-01:80" />
        <member addr="www-02:80" />

</pool>

<!-- create a ruleset that adds Forwarded-For headers, sets the Host header to the vhost name and uses pool1 --> <ruleset name="rule1">

        <location path="/">
                <req cmd="prepend" name="X-Forwarded-For" value="%a" join=", " />
                <req cmd="set" name="X-Forwarded-Host" value="%{Host}H" />
                <sethost host="%v" />
                <setpool name="pool1" />
        </location>

</ruleset>

<!-- create a vhost. all requests to the ip of mypage.com will be forwarded to pool1, sending Host: www.mypage.com) --> <vhost name="www.mypage.com">

        <binding addr="www.mypage.com:80" />
        <rule name="rule1" />

</vhost>

</xtm-config>

*** IP forwarding ***

install mod_rpaf for apache; add the following configuration to xtm.conf:

<req cmd="prepend" name="X-Forwarded-For" value="%a" join=", " /> <req cmd="set" name="X-Forwarded-Host" value="%{Host}H" />

*** additional files ***

extra/dynratio.init, extra/dynratio.php, extra/lbstatus.php

        copy lbstatus.php to apache web
        dynratio.init start
        dynratio script checks all webservers for lbstatus.php; checking if 
        configuration and server is ok.

extra/status.php

copy to a webserver; shows status of load balancer


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.