[rt-users] lighttpd + FastCGI + RT - Broken CSS / Menu Items Dont Work

Maxwell Rathbone mrathbone at sagonet.com
Wed Nov 18 20:19:06 EST 2009


Hello,

Once again it appears I've run into a snag. I'm running lighttpd with RT 
on CentOS 5.4. This is my first attempt at trying to get RT to run under 
lighttpd with FastCGI. When I open the RT URL in my browser, everything 
is flush left and the only image shown anywhere on the page is the best 
practical logo. There are no colors on the page at all aside from the 
links themselves. My first thought was that there must be a missing CSS 
file. So I first hunted through the access.log for lighttpd only to find 
a status code 200 on everything. This implies the web server was able to 
provide my browser all files.

I next logged into the interface, and was presented with what appears to 
be the dashboard, and logged in user menu. Again, no colors, no 
formatting on the page. Appears as if some CSS file somewhere is 
missing. I discovered that none of the menu items(Simple Search, 
Tickets, Tools, Configuration, Preferences, etc) work. When I click 
them, the URL changes, however I continue to only be shown the homepage 
in my browser.

I double checked all the examples I could find online and my 
lighttpd.conf appears to be correct. I feel I'm at a loss here. If 
anyone can provide some help on this one, I'd appreciate it.

The best that I seem to be able to determine is that it's probably 
something wrong in the lighttpd's mod_rewrite configuration as it seems 
to be redirecting what should be static URL's to the homepage.

Here is my lighttpd.conf file:
server.modules              = (
                               "mod_rewrite",
                               "mod_redirect",
                               "mod_alias",
                                "mod_access",
                               "mod_cml",
                               "mod_trigger_b4_dl",
                               "mod_auth",
                               "mod_status",
                               "mod_setenv",
                               "mod_fastcgi",
                               "mod_proxy",
                               "mod_simple_vhost",
                               "mod_evhost",
                               "mod_userdir",
                               "mod_cgi",
                               "mod_compress",
                               "mod_ssi",
                               "mod_usertrack",
                               "mod_expire",
                               "mod_secdownload",
#                               "mod_rrdtool",
                                "mod_accesslog" )

server.document-root        = "/srv/www/lighttpd/"
server.errorlog             = "/var/log/lighttpd/error.log"
index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm" )
mimetype.assign             = (
  ".rpm"          =>      "application/x-rpm",
  ".pdf"          =>      "application/pdf",
  ".sig"          =>      "application/pgp-signature",
  ".spl"          =>      "application/futuresplash",
  ".class"        =>      "application/octet-stream",
  ".ps"           =>      "application/postscript",
  ".torrent"      =>      "application/x-bittorrent",
  ".dvi"          =>      "application/x-dvi",
  ".gz"           =>      "application/x-gzip",
  ".pac"          =>      "application/x-ns-proxy-autoconfig",
  ".swf"          =>      "application/x-shockwave-flash",
  ".tar.gz"       =>      "application/x-tgz",
  ".tgz"          =>      "application/x-tgz",
  ".tar"          =>      "application/x-tar",
  ".zip"          =>      "application/zip",
  ".mp3"          =>      "audio/mpeg",
  ".m3u"          =>      "audio/x-mpegurl",
  ".wma"          =>      "audio/x-ms-wma",
  ".wax"          =>      "audio/x-ms-wax",
  ".ogg"          =>      "application/ogg",
  ".wav"          =>      "audio/x-wav",
  ".gif"          =>      "image/gif",
  ".jar"          =>      "application/x-java-archive",
  ".jpg"          =>      "image/jpeg",
  ".jpeg"         =>      "image/jpeg",
  ".png"          =>      "image/png",
  ".xbm"          =>      "image/x-xbitmap",
  ".xpm"          =>      "image/x-xpixmap",
  ".xwd"          =>      "image/x-xwindowdump",
  ".css"          =>      "text/css",
  ".html"         =>      "text/html",
  ".htm"          =>      "text/html",
  ".js"           =>      "text/javascript",
  ".asc"          =>      "text/plain",
  ".c"            =>      "text/plain",
  ".cpp"          =>      "text/plain",
  ".log"          =>      "text/plain",
  ".conf"         =>      "text/plain",
  ".text"         =>      "text/plain",
  ".txt"          =>      "text/plain",
  ".dtd"          =>      "text/xml",
  ".xml"          =>      "text/xml",
  ".mpeg"         =>      "video/mpeg",
  ".mpg"          =>      "video/mpeg",
  ".mov"          =>      "video/quicktime",
  ".qt"           =>      "video/quicktime",
  ".avi"          =>      "video/x-msvideo",
  ".asf"          =>      "video/x-ms-asf",
  ".asx"          =>      "video/x-ms-asf",
  ".wmv"          =>      "video/x-ms-wmv",
  ".bz2"          =>      "application/x-bzip",
  ".tbz"          =>      "application/x-bzip-compressed-tar",
  ".tar.bz2"      =>      "application/x-bzip-compressed-tar",
  # default mime type
  ""              =>      "application/octet-stream",
 )

accesslog.filename          = "/var/log/lighttpd/access.log"
url.access-deny             = ( "~", ".inc" )

$HTTP["url"] =~ "\.pdf$" {
  server.range-requests = "disable"
}
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
server.pid-file            = "/var/run/lighttpd.pid"
server.username            = "lighttpd"
server.groupname           = "lighttpd"

$HTTP["host"] =~ "rt.sagonet.com" {
  # Specify the documentroot
  server.document-root = "/opt/rt3/share/html"

  # Map appropriate files and extensions
  fastcgi.map-extensions = ( ".css" => ".html", ".js" => ".html", "/" => 
".html", "mail-gateway" => ".html", "Search/Chart" => ".html", 
"Search/Results.rdf" => ".html", "Search/Results.tsv" => ".html" )

  # Set Lighttpd to check for an index.html file for each directory
  index-file.names = ( "index.html" )

  # Disallow access to .mhtml files
  url.access-deny = ( ".mhtml" )

  setenv.add-environment = (
       "SCRIPT_NAME" => "/",
  )

  # Set up an alias for the /NoAuth/images location
  url.rewrite-once = (
       "^/(?!NoAuth/images/)(.*)" => "/$1",
        "^(.*)/Ticket/Attachment/(.*)" => "/$1/Ticket/Attachment/$2/"
  )

  # Set up FastCGI handler
  fastcgi.server = ( ".html" =>
     ((
                "socket" => "/tmp/request-tracker.socket",
                "check-local" => "disable",
                "bin-path" => "/opt/rt3/bin/mason_handler.fcgi",
                "min-procs"     => 2,
                "max-procs"     => 2
      )),

  )



}


thank you

Max Rathbone



More information about the rt-users mailing list