Hi Eric,

When we build URLs, we use SITE_ROOT as the prefix for the path. So that
must always be "/reviewboard/".

You said you tried multiple combinations. If you set SITE_ROOT (and then
restart Apache), what other problems did you hit?

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Fri, May 27, 2011 at 3:21 PM, Eric Mann <e...@eam.me> wrote:

> Running Review Board 1.5.5 on Apache 2.2 under Windows Server 2003.  Just
> about everything works beautifully, except ...
>
> The subdirectory is stripped off of the URL in rare cases.
>
> I'm running Review Board as http://devserver/reviewboard/  This way it can
> run along side Trac (http://devserver/trac/).  Unfortunately, the
> /reviewboard/ randomly disappears at times:
>
>    - If I'm logged out and try to navigate to http://devserver/reviewboard,
>    the browser redirects to
>    http://devserver/account/login/?next_page=/reviewboard//dashboard/
>    - If I'm logged in and log out, the browser redirects to
>    http://devserver/account/login/
>    - If I try to close a review (as submitted, discarded, or delete), the
>    browser tries to make a request from
>    http://devserver/api/json/reviewrequests/2/close/submitted/ rather
>    than
>    http://devserver/reviewboard/api/json/reviewrequests/2/close/submitted/
>
> This isn't a showstopper in terms of personal usability, as I can still use
> Review Board just fine and it still integrates with TortoiseHg as expected.
>  However, it is a major problem when it comes to working with other
> developers and to streamlining our development process.  I need to figure
> out what's going wrong with the URL redirection and fix it quickly.
>
> For reference:
>
>    - I'm running mod_wsgi, and I understand this has been a problem in the
>    past as well.
>    - I have tried every possible variation of "/" "/reviewboard"
>    "reviewboard/" "/reviewboard/" I could come up with for both SITE_ROOT and
>    FORCE_SCRIPT_NAME
>
> Here's the VirtualHost directive from Apache:
>
> <VirtualHost *:80>
> ServerName devserver
>  DocumentRoot "E:/Inception/ReviewBoard/htdocs"
>
> # Error handlers
>  ErrorDocument 500 /errordocs/500.html
>
> WSGIPassAuthorization On
>  WSGIScriptAlias "/reviewboard"
> "E:/Inception/ReviewBoard/htdocs/reviewboard.wsgi"
> WSGIScriptAlias "/trac" "E:/Inception/Trac/cgi-bin/trac.wsgi"
>
> <Location '/trac'>
> AuthType Basic
> AuthName "Trac"
>  AuthUserFile E:/Inception/Trac/.htpasswd
> Require valid-user
> </Location>
>
> <Directory "E:/Inception/ReviewBoard/htdocs">
> AllowOverride All
>  </Directory>
>
> <Directory "E:/Inception/Trac/htdocs">
>  WSGIApplicationGroup %{GLOBAL}
> Order allow,deny
> Allow from All
>  </Directory>
>
> # Alias static media requests to filesystem
>  Alias /reviewboard/media "E:/Inception/ReviewBoard/htdocs/media"
> Alias /reviewboard/errordocs "E:/Inception/ReviewBoard/htdocs/errordocs"
>  Alias /trac/chrome/common "E:/Inception/Trac/htdocs/common"
> Alias /trac/chrome/site "E:/Inception/Trac/htdocs/site"
> </VirtualHost>
>
> And my settings_local.py file:
>
> # 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 = 'reviewboard'
> DATABASE_USER = 'reviewboard'
> DATABASE_PASSWORD = 'password'
> DATABASE_HOST = 'localhost'
> DATABASE_PORT = ''
>
> # Unique secret key. Don't share this with anybody.
> SECRET_KEY = ...
>
> # Cache backend settings.
> CACHE_BACKEND = 'memcached://localhost:11211/'
>
> # Extra site information.
> SITE_ID = 1
> SITE_ROOT = '/'
> FORCE_SCRIPT_NAME = '/reviewboard/'
> DEBUG = True
>
> I think this might have something to do with the way Review Board and
> Django are talking to each other and how they're redirecting the URL ... but
> I'm not 100% sure.  Ideas?
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to