SABnzbd + Lighttpd on Debian Lenny Using mod_proxy

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
alghanmi
Newbie
Newbie
Posts: 1
Joined: November 1st, 2010, 1:36 am

SABnzbd + Lighttpd on Debian Lenny Using mod_proxy

Post by alghanmi »

I have been trying to get SABnzbd to work with a Lighttpd proxy with no success. Everything was working fine with Apache ProxyPass, but not with Lighttpd. A Google search led me to a forum post titled TUTORIAL: Securing SABnzbd+ behind lighttpd authentication, however, it did not work for me. I would appreciate some help on this.

Software: Configuration Highlights
Debian
  • Standard VPS installation
  • Firewall disabled
  • The following packages were installed: sabnzbdplus sabnzbdplus-theme-classic sabnzbdplus-theme-plush sabnzbdplus-theme-mobile python-cheetah python-configobj python-feedparser python-support python-openssl python-yenc par2 unzip zip unrar unace
SABnzbd:

Code: Select all

% cat /etc/default/sabnzbdplus | grep -v '^$\|^#'
USER=www-data
CONFIG=/home/www/sabnzbd/sabnzbd.ini
HOST=0.0.0.0
PORT=8080
EXTRAOPTS=-l2
Lighttpd:
Here are the relevant parts

Code: Select all

server.modules = ( "mod_access", "mod_alias", "mod_accesslog", "mod_compress", "mod_auth", "mod_proxy", "mod_redirect", "mod_rewrite" )
$HTTP["host"] =~ "^sub\.domain\.com$" {
    # Some host specific configuration like logs & document-root
    $HTTP["url"] =~ "^/nzb/$" {
        proxy.debug = 2
        proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => 8080 ) ) )
    }
}
Current System Status
What Works
SABnzbd works when accessed from the local machine using the following methods:

Code: Select all

%curl http://sub.domain.com:8080
%curl http://localhost:8080
What Doesn't Works
When accessing SABnzbd from localhost or a remote machine, the following will not work

Code: Select all

%curl http://sub.domain.com/nzb/

<br/><br/>
As you can see, I simple get the White Screen of Death (WSoD).

I found out that, as far as I could tell, lighttpd is forwarding the request to SABnzbd. Here is a snippet from the lighttpd access log:
"GET /nzb/ HTTP/1.1" 200 12 "-" "curl/7.18.2 (x86_64-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.8 libssh2/0.18"
I get the following in the lighttpd error logs (because I enabled mod_proxy debugging):
2010-11-01 00:15:46: (mod_proxy.c.1080) proxy - start
2010-11-01 00:15:46: (mod_proxy.c.1118) proxy - ext found
2010-11-01 00:15:46: (mod_proxy.c.1161) proxy - used fair balancing
2010-11-01 00:15:46: (mod_proxy.c.1242) proxy - found a host 127.0.0.1 8080
2010-11-01 00:15:46: (mod_proxy.c.377) connect delayed: 9
2010-11-01 00:15:46: (mod_proxy.c.994) proxy: fdevent-out 1
2010-11-01 00:15:46: (mod_proxy.c.805) proxy - connect - delayed success
2010-11-01 00:15:46: (mod_proxy.c.961) proxy: fdevent-in 4
2010-11-01 00:15:46: (mod_proxy.c.645) proxy - have to read: 251
2010-11-01 00:15:46: (mod_proxy.c.961) proxy: fdevent-in 4
2010-11-01 00:15:46: (mod_proxy.c.645) proxy - have to read: 12
2010-11-01 00:15:46: (mod_proxy.c.961) proxy: fdevent-in 4
2010-11-01 00:15:46: (mod_proxy.c.645) proxy - have to read: 0
The sabnzbd.error.log has the following error once for every http session requesting the above URL:
/usr/share/sabnzbdplus/cherrypy/lib/encoding.py:196: DeprecationWarning: 'l' format requires -2147483648 <= number <= 2147483647 yield struct.pack("<l", crc)

I have spent too much time trying to resolve this issue  ???. I am seeking your assistance now.
Last edited by alghanmi on November 1st, 2010, 2:35 am, edited 1 time in total.
Post Reply