我一直在尝试安装 ReviewBoard 并且看起来一切顺利,我可以访问该站点和功能
但是,我很奇怪,由于某种原因似乎没有应用样式表。
我怀疑这可能是它无法访问的文件夹的权限问题,或者我犯了一些 Apache 设置错误。
是否有任何可能导致此问题的 Apache 配置?
有没有人遇到过类似的问题,而不仅仅是 ReviewBoard?
更多信息:看起来 Apache 正在接收对样式表的请求
- [20/5/2009:10:00:35 +0100]“GET /reviewboard/media/rb/css/common.css?1242747706 HTTP/1.1”404 2512
[20/5/2009:10:00:35 +0100]“GET /reviewboard/media/rb/css/ie_hacks.css?1242747706 HTTP/1.1”404 2514
[20/5/2009:10:00:36 +0100]“GET /reviewboard/media/rb/js/csshover2.htc?1242747706 HTTP/1.1”404 2514
- [20/5/2009:10:00:36 +0100]“GET /reviewboard/media/rb/js/pngfix.htc?1242747706 HTTP/1.1”404 2511
编辑:查看访问日志,CSS 的 GET 实际上是 404-ing,因为路径应该是 reviewboard/htdocs/media/rb/css/* (尽管我假设在 HTTP.conf 中有一个别名处理了这个.
编辑: .htaccess 文件包含
<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>
编辑:
httpd.conf 部分如下所示
<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>