On Wednesday, July 9, 2014 10:59:25 PM UTC+2, Christian Hammond wrote:
> The /static/ path is completely disabled unless you’re running a
> development (DEBUG=True) install straight out of the Git source tree
> (basically, an install that is not at all suitable for production usage).
> This is just to help development. Review Board should never be responsible
> for serving static media files, since it’s jut too slow at it, and it’ll
> bog down the server.
>
I knew that -- this is why I complained, that also the static files are
handeled by reviewboard.fcgi. And as you say: they should not. The
url-rewrite-rules did exactly this, though.
Ok, I finally managed to get it working. I'm not sure, whether I did it as
intended, but the 404-errors are gone and I guess I understand better, now,
what happens in the rewrite rules. In contrast to the lighttpd config
generated by rb-site, I use the following rules to modify the url:
# The requested media, static etc files shall point the the correct
places
# on the file system.
alias.url = (
"/rbex3/media" => "/srv/http/rbex3/htdocs/media",
"/rbex3/static" => "/srv/http/rbex3/htdocs/static",
"/rbex3/errordocs" => "/srv/http/rbex3/htdocs/errordocs",
)
# Interpret paths: If it's a media, static or errordoc path, don't do
# anything with it (substitute it with the path itself) and don't try to
# match any of the following substitutions. if it's neither media nor
# static nor errordoc but contains the /reviewboard.fcgi executable,
also
# don't do anything. All other urls are appended to the
reviewboard.fcgi
# executable, so reviewboard handels them.
url.rewrite-once = (
"^(/rbex3/media/.*)$" => "$1",
"^(/rbex3/static/.*)$" => "$1",
"^(/rbex3/errordocs/.*)$" => "$1",
"^(/reviewboard.fcgi.*)$" => "$1",
"^(/.*)$" => "/reviewboard.fcgi$1",
)
All the pages generated by django/reviewboard use a path `/rbex3/...', for
example
src="/rbex3/static/rb/js/dashboard.min.js
<view-source:http://virtualarch/rbex3/static/rb/js/dashboard.min.js>"
and thus the rules in the default config did not match the urls correctly.
After I added the `/rbex3'-part in all the regexpes, the paths are computed
correctly and mapped to my file system correctly.
Cheers,
Michael
--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.