views:

595

answers:

2

I have been trying to install ReviewBoard and all looks like it has gone well, in as much as I can access the site and functionality

However, I have strangeness where no style sheet appears to be applied for some reason.

I suspect it may be a permissions issue on a folder that it can't access or some Apache setup error I have made.

Is there any Apache configuration that could have caused this?

Has anyone experienced any similar problems not just for ReviewBoard?

Further info: It looks like Apache is receiving the request for the Stylesheets

  • [20/May/2009:10:00:35 +0100] "GET /reviewboard/media/rb/css/common.css?1242747706 HTTP/1.1" 404 2512
  • [20/May/2009:10:00:35 +0100] "GET /reviewboard/media/rb/css/ie_hacks.css?1242747706 HTTP/1.1" 404 2514

  • [20/May/2009:10:00:36 +0100] "GET /reviewboard/media/rb/js/csshover2.htc?1242747706 HTTP/1.1" 404 2514

  • [20/May/2009:10:00:36 +0100] "GET /reviewboard/media/rb/js/pngfix.htc?1242747706 HTTP/1.1" 404 2511

EDIT: Looking at the access logs the GET for the CSS is actually 404-ing as the path should be reviewboard/htdocs/media/rb/css/* (although there is an alias in the HTTP.conf that I assumed dealt with this.

EDIT: The .htaccess file contains

<IfModule mod_expires.c>
  <FilesMatch "\.(jpg|gif|png|css|js|htc)">
    ExpiresActive on
    ExpiresDefault "access plus 1 year"
  </FilesMatch>
</IfModule>

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>

EDIT:

The httpd.conf sections looks like this

<VirtualHost *:8080>
    ServerName FASKALLYRB
    DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/reviewboard/htdocs"

    # Error handlers
    ErrorDocument 500 /errordocs/500.html
    ErrorDocument 404 /errordocs/500.html

    # Serve django pages
    <Location "/">
     PythonPath "['C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/reviewboard/conf'] + sys.path"
     SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
     SetEnv PYTHON_EGG_CACHE "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/reviewboard/tmp/egg_cache"
     SetHandler mod_python
     PythonHandler django.core.handlers.modpython
     PythonAutoReload Off
     PythonDebug Off
     # Used to run multiple mod_python sites in the same apache
     PythonInterpreter reviewboard_reviewboard
    </Location>

    # Serve static media without running it through mod_python
    # (overrides the above)
    <Location "reviewboard/media">
     SetHandler None
    </Location>
    <Location "reviewboard/errordocs">
     SetHandler None
    </Location>

    <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/reviewboard/htdocs">
     AllowOverride All
    </Directory>

    # Alias static media requests to filesystem
    Alias reviewboard/media "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/reviewboard/htdocs/media"
    Alias reviewboard/errordocs "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/reviewboard/htdocs/errordocs"
</VirtualHost>
A: 

You could make a symlink in reviewboard called 'media' that points at htdocs/media perhaps.

Alternatively:

  1. move htdocs/media to ..
  2. or go into the reviewboard code and tweak the url generating code
  3. or if you have mod_rewrite installed you could redirect requests to the right place
aidan
A: 

The URL for Location and Alias directives can't be relative and needs a leading slash. Thus you should be using '/reviewboard/.......'.

FWIW, the PythonInterpreter directive isn't used for what your comment against it seems to indicate you think it does.

# Used to run multiple mod_python sites in the same apache
PythonInterpreter reviewboard_reviewboard

The application is always run within same Apache instance. What PythonInterpreter does is allow you control which Python sub interpreter within each Apache server child process it runs. It is actually redundant in your case, as the same sub interpreter is by default used for all mod_python hosted applications under the same VirtualHost. Note that there will still be multiple instances of the application, on in each of the Apache server child processes.

Graham Dumpleton