Strange CSS / Apache issue

I am trying to install ReviewBoard and everything looks like it went well, as far as I can access the site and features

However, I have an oddity where for some reason no stylesheet is being applied.

I suspect it could be a permissions issue on a folder that it doesn't have access to, or some kind of Apache installation error.

Is there any Apache configuration that could cause this?

Has anyone encountered similar issues outside of ReviewBoard?

Additional info: It looks like Apache is getting a request for styles

  • [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: Viewing the GET access logs for CSS is actually 404-ing as the path has to be viewed / htdocs / media / rb / css / * (although there is an alias in the HTTP.conf that I assumed to have looked at 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 look 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>

      

0


a source to share


2 answers


Location and Alias ​​URL directives cannot be relative and require a forward slash. So you have to use '/ reviewboard / .......'.

FWIW, the PythonInterpreter directive is not being used so your comment on it seems to indicate that you think it is.



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

      

The application always runs inside one Apache instance. What PythonInterpreter does is it lets you control which Python sub-interpreter is executed in each child Apache server process. This is actually redundant in your case, as the same default sub-interpreter is used for all hosted mod_python applications under the same VirtualHost. Note that each of the Apache server child processes will still have multiple instances of the application.

0


a source


You can make a symbolic link in the overview called "media" which may point to htdocs / media.

As an alternative:



  • move htdocs / media ..
  • or go to the review code and customize the URL generation code.
  • or if you have mod_rewrite installed, you can redirect requests to the desired location.
0


a source







All Articles