switching from nginx to LSLB

Discussion in 'General' started by Clockwork, Sep 17, 2009.

  1. Clockwork

    Clockwork Well-Known Member


    I would like to switch from nginx to lslb, but I need help with the configuration

    I'm currently using this nginx configuration:

      upstream xyz {
        server weight=5;
        server weight=3;
        server weight=1;
      server { # simple reverse-proxy
        listen       80;
        server_name  www.xyz.com;
        # upload fix
        client_max_body_size 12m;
        # serve static files
        location ~ /(images|customavatars|customprofilepics|customgroupicons|signaturepics|albums|attachments|clientscript|iconimages|vbulletin_css|vbseo_sitemap)/  {
          root    /var/www/xyz/httpdocs/forum;
        # sitemaps
        location ~ /sitemap_ {
          root    /var/www/xyz/httpdocs/forum;
        # pass requests for dynamic content to rails/turbogears/zope, et al
        location / {
          proxy_pass      http://xyz;
    I've just did this tutorial: http://www.wowtutorial.org/tutorial/80.html

    but there isn't mentioned how to use the "Content aware: route request based on request content" feature.
  2. mistwang

    mistwang LiteSpeed Staff

    From your nginx configuration, I guess you want to route requests based on URL.

    For sitemap and static file, create a cluster with one member, then create a regex matching context, use that cluster as handler.

    Create a cluster with members,,, use it as default cluster.
  3. Clockwork

    Clockwork Well-Known Member

    could you give me an example screenshot on that context thingy? or a link to the documentation?
    Last edited: Sep 17, 2009
  4. mistwang

    mistwang LiteSpeed Staff

    For online help, please click the "Help" link in the web console, then go to "Configuration"->"Context"

    It is very simple if you familiar with our web server admin console.
    Just like a proxy context for web server.
    The URI should be like

    exp: ^/(images|customavatars|customprofilepics|customgroupicons|signaturepics|albums|attachments|clientscript|iconimages|vbulletin_css|vbseo_sitemap)/
    You can combine it with '~ /sitemap_' or create another context for it, just like the nginx configuration.

Share This Page