Mailinglist Archive: opensuse-buildservice (366 mails)

< Previous Next >
Re: [opensuse-buildservice] lighttpd config for repo hosting on build server
  • From: Marcus Rueckert <mrueckert@xxxxxxx>
  • Date: Fri, 24 Aug 2007 18:25:15 +0200
  • Message-id: <20070824162515.GG3255@xxxxxxx>
On 2007-08-24 13:31:33 +0200, Scott Bahling wrote:
> I'm not that experienced with http server configuration, and I hope
> someone can help me here. I am running my own build service and want to
> host the repositories from the same server - ie change the
> software.opensuse.org/download links to a point to a subdirectory url on
> my build server machine. I can't figure out how to get lighttpd to _not_
> pass a specific url (and all subdirs) to rails, and just handle as a
> normal http request. 
> 
> It looks like the $HTTP["url"] conditional would do the trick, but no
> matter how I try to use it, I can't get this to work in harmony with
> rails.
> 
> Here is an example of what I am trying to do in obs.conf. I have tried
> many variations without luck:
> 
> $HTTP["host"] =~ "partnerbuild(|.suse.de)" {
>   rails_app   = "webclient"
>   rails_root  = "/srv/www/obs/webclient"
>   rails_procs = 5
>   # production/development are typical values here
>   rails_mode  = "development"
> 
>   log_root = "/srv/www/obs/webclient/log"
> 
>   include "vhosts.d/rails.inc"
>   
>   alias.url = ( "/repos/" => "/srv/obs/repos/" )
>   $HTTP["url"] =~ "/repos/" {
>         dir-listing.activate = "enable"
>         server.document-root = "/srv/obs/repos/"
>   }
> 
> }

the mod_magnet script overrides that.

try the following

$HTTP["host"] =~ "partnerbuild(|.suse.de)" {
  rails_app   = "webclient"
  rails_root  = "/srv/www/obs/webclient"
  rails_procs = 5
  # production/development are typical values here
  rails_mode  = "development"

  log_root = "/srv/www/obs/webclient/log"

  alias.url = ( "/repos/" => "/srv/obs/repos/" )
  $HTTP["url"] =~ "^/repos/" {
      dir-listing.activate = "enable"
  }
  else $HTTP["url"] !~ "^/repos/" {
      include "vhosts.d/rails.inc"
  }
}

    darix

-- 
          openSUSE - SUSE Linux is my linux
              openSUSE is good for you
                  www.opensuse.org
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
References