404 error when using reviewboard with lighttpd

128 views
Skip to first unread message

joseph.pnc

unread,
Apr 10, 2009, 11:27:09 PM4/10/09
to reviewboard
Hi all

I'd really appreciate any kind help. I've spent many hours on this
issue and yet to have a solution. I've searched forums (including
this) and google. I'm a newbie to reviewboard so please bear with me.
Here's my problem

I'm running lighttpd and fastcgi. reviewboard can run fine through the
manage.py command. But I need to run it thru lighttpd so I copied
lighttpd.conf file from conf/ folder to my lighttpd config folder.
When browsing, it gives me this error regardless of what link I click:

"
The page you were looking for does not exist.

If you're pretty sure this page does exist, try logging in and trying
again.
"

I could see reviewboard's logo and other links. (you may try visiting
codereview.lionsoftwaresolutions.com to see what it's like)

My config file:
[code]
server.modules += (
"mod_auth",
"mod_access",
"mod_rewrite",
"mod_expire",
"mod_fastcgi",
"mod_alias",
"mod_accesslog",
"mod_compress",
)

$HTTP["host"] =~ "codereview\.lionsoftwaresolutions\.com" {
# This is not used directly, it is superceded by our aliases
below.
server.document-root = "/home/lss/
codereview.lionsoftwaresolutions.com/htdocs"
server.errorlog = "/home/lss/
codereview.lionsoftwaresolutions.com/logs/lighttpd-error.log"
accesslog.filename = "/home/lss/
codereview.lionsoftwaresolutions.com/logs/lighttpd-access.log"

fastcgi.server = (
"/reviewboard.fcgi" => (
"main" => (
"bin-path" => "/home/lss/
codereview.lionsoftwaresolutions.com/htdocs/reviewboard.fcgi",
"socket" => "/tmp/rb-fastcgi.sock",
"check-local" => "disable",
)
),
)

alias.url = (
"/media" => "/home/lss/codereview.lionsoftwaresolutions.com/
htdocs/media",
"/errordocs" => "/home/lss/
codereview.lionsoftwaresolutions.com/htdocs/errordocs",
)

url.rewrite-once = (
"^(/media/.*)$" => "$1",
"^(/errordocs/.*)$" => "$1",
"^(/.*)$" => "/reviewboard.fcgi$1",
)

# Aggressively cache all static files
$HTTP["url"] =~ "\.(jpg|gif|png|css|js|htc)" {
expire.url = ( "" => "access 1 years" )
}


# Compress files for faster transfer
compress.filetype = (
"text/plain",
"text/html",
"text/javascript",
"text/css",
"text/xml"
)
compress.cache-dir = "/home/lss/
codereview.lionsoftwaresolutions.com/tmp/"


mimetype.assign = (
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".ico" => "image/png",
".png" => "image/png",
".pdf" => "application/pdf",
".gz" => "application/x-gzip",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".txt" => "text/plain",
".js" => "text/javascript",
)
}
[/code]

My reviewboard.fcgi :
[code]
#!/usr/bin/env python

import os, sys

sys.path.insert(0, "/home/lss/codereview.lionsoftwaresolutions.com/
conf")
os.environ["DJANGO_SETTINGS_MODULE"] = "reviewboard.settings"
os.environ["PYTHON_EGG_CACHE"] = "/home/lss/
codereview.lionsoftwaresolutions.com/tmp/egg_cache"

from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")
[/code]

*I don't know where reviewboard.settings resides though.

and here's my settings_local.py
# Site-specific configuration settings for Review Board
# Definitions of these settings can be found at
# http://docs.djangoproject.com/en/dev/ref/settings/

# Database configuration
DATABASE_ENGINE = 'mysql'
DATABASE_NAME = '<deleted when posting>'
DATABASE_USER = '<deleted when posting>'
DATABASE_PASSWORD = '<deleted when posting>'
DATABASE_HOST = 'localhost'
DATABASE_PORT = ''

# Unique secret key. Don't share this with anybody.
SECRET_KEY = '<deleted when posting>'

# Cache backend settings.
CACHE_BACKEND = 'memcached://localhost:11211/'

# Extra site information.
SITE_ID = 1
SITE_ROOT = '/'
FORCE_SCRIPT_NAME = '/'
DEBUG = False

ReviewBoard is installed at:
$ ls /usr/lib/python2.4/site-packages/ReviewBoard-1.0beta2-py2.4.egg/
EGG-INFO/ reviewboard/

Please help! Thanks in advance.
Joseph

Christian Hammond

unread,
Apr 11, 2009, 2:26:04 AM4/11/09
to revie...@googlegroups.com
Oh, didn't see this before the other e-mail.

In settings_local.py, try changing FORCE_SCRIPT_NAME to "" and see what happens.

Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com

joseph.pnc

unread,
Apr 11, 2009, 2:44:35 AM4/11/09
to reviewboard
Hi, Thanks for replying. Yes, I updated it to: FORCE_SCRIPT_NAME = ''
But it still hits the same error.

Christian Hammond

unread,
Apr 11, 2009, 2:52:31 AM4/11/09
to revie...@googlegroups.com
Hmm, okay. I think what I'd recommend at this point is adding DEBUG = True to your settings_local.py and restarting. You should see a more detailed 404 page that tells you what it tried to find and the possible matching URLs. That info would be useful.


Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


joseph.pnc

unread,
Apr 11, 2009, 3:09:51 AM4/11/09
to reviewboard
I set it to True, and here's the log:

Using the URLconf defined in djblets.util.rooturl, Django tried these
URL patterns, in this order:

1. ^ ^admin/
2. ^ ^media/(?P<path>.*)$
3. ^ ^account/
4. ^ ^api/(?P<api_format>json|xml)/
5. ^ ^r/
6. ^ ^reports/
7. ^ ^dashboard/$
8. ^ ^users/$
9. ^ ^users/(?P<username>[A-Za-z0-9_\-\.]+)/$
10. ^ ^groups/$
11. ^ ^groups/(?P<name>[A-Za-z0-9_-]+)/$
12. ^ ^groups/(?P<name>[A-Za-z0-9_-]+)/members/$
13. ^ ^feeds/rss/(?P<url>.*)/$
14. ^ ^feeds/atom/(?P<url>.*)/$
15. ^ ^account/logout/$
16. ^ ^$
17. ^ ^iphone/

The current URL, reviewboard.fcgi/, didn't match any of these
--------------------

[lss-main htdocs]# pwd
/home/lss/codereview.lionsoftwaresolutions.com/htdocs
[lss-main htdocs]# ls -ltr
total 12
-rwxr-xr-x 1 lss lss 372 Apr 11 14:17 reviewboard.fcgi
drwxr-xr-x 3 lss lss 4096 Apr 11 14:17 media
lrwxrwxrwx 1 lss lss 92 Apr 11 14:17 errordocs -> /usr/lib/python2.4/
site-packages/ReviewBoard-1.0beta2-py2.4.egg/reviewboard/htdocs/
errordocs


But that's so strange, my doc root is pointing to /home/lss/
codereview.lionsoftwaresolutions.com/htdocs and reviewboard.fcgi is
there. U got any ideas? Thanks.

Christian Hammond

unread,
Apr 11, 2009, 3:19:20 AM4/11/09
to revie...@googlegroups.com
And that's with FORCE_SCRIPT_NAME as "", right? What happens if it's back to "/" ? (Mainly interested in the line that says "The current URL [...] didn't match any of these."


Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


joseph.pnc

unread,
Apr 11, 2009, 3:23:12 AM4/11/09
to reviewboard
Yes, that one above was when it's ''. I updated to "/"
and it shows the same error:

The current URL, reviewboard.fcgi/, didn't match any of these.

Joseph.

Christian Hammond

unread,
Apr 11, 2009, 3:34:49 AM4/11/09
to revie...@googlegroups.com
So, this issue has come up before, and the solution each time was to add FORCE_SCRIPT_NAME = "/". We since made it the default for lighttpd. I can't figure out why you're hitting this issue, given that. A google search isn't turning up much, either...

I just tested a config of lighttpd that matches your config except for the domain name and path, and it works fine.

What version of lighttpd are you using? I'm using 1.4.19 here.


Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


joseph.pnc

unread,
Apr 11, 2009, 3:44:51 AM4/11/09
to reviewboard
Thanks so much for putting your efforts into helping me. My lighttpd
server is 1.1.2.7
I'm using it with lxadmin. Now I wonder if it could be some conflict
with lxadmin configuration.

I guess I just got to keep trying.=)

joseph.pnc

unread,
Apr 11, 2009, 6:13:06 AM4/11/09
to reviewboard
I decided to try running it from ./manage.py command. It works! Still,
running under lighttpd has no hope yet. If anyone found a solution,
please kindly help. Thanks.

Here's the link that help me figure out how to install on my centos
server and run through manage.py for whoever may read this thread in
the future (I skipped the apache-related part though):
http://f13o.blogspot.com/2008/01/install-reviewboard-on-centos-51.html
Reply all
Reply to author
Forward
0 new messages