# Strange behavior with lighttpd

**URL:** <https://www.ruby-forum.com/t/strange-behavior-with-lighttpd/134480>\
**Category:** Rails\
**Created:** [April 11, 2008, 7:57am UTC](https://www.ruby-forum.com/t/strange-behavior-with-lighttpd/134480 "2008-04-11T07:57:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyrre](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8e7dd6/32.png) [@kyrre](https://www.ruby-forum.com/u/kyrre)\
**Post date:** [April 11, 2008, 7:57am UTC](https://www.ruby-forum.com/t/strange-behavior-with-lighttpd/134480/1 "2008-04-11T07:57:23Z")

</div>

I got this strange problem with my Rails app here in lighttpd…  
sometimes it appears and sometimes it doesn’t. When it does appear, and  
I try to refresh it from Firefox, it won’t appear until I clear my  
cache.

Huh?

lighttpd\_error.log says “(response.c.467) Path:  
/services/httpd/mysite.com/www/public/dispatch.fcgi – file found” which  
is strange, because the file _is_ there, and if it was a permission  
problem it probably wouldn’t display at all.

Here is my configuration:

server.modules = ( “mod\_access”, “mod\_accesslog”, “mod\_rewrite”,  
“mod\_redirect”, “mod\_fastcgi” )  
server.document-root = “/usr/local/www”  
server.errorlog = “/var/log/lighttpd\_error.log”

debug.log-request-handling = “enable”

index-file.names = ( “index.html” )

mimetype.assign = (  
Â “.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”,  
Â “.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”  
)

url.access-deny = ( “~”, “.inc” )

$HTTP[“url”] =~ “.pdf$” { server.range-requests = “disable” }

server.error-handler-404 = “/error-handler.html”

server.pid-file = “/var/run/lighttpd.pid”

$HTTP[“host”] =~ “.mysite.com” {

Â Â Â server.document-root = “/services/httpd/mysite.com/www/public”  
Â Â Â accesslog.filename = “/services/httpd/mysite.com/logs/access.log”  
Â Â Â fastcgi.server = ( “.fcgi” =\> ( “mysite” =\> (“socket” =\>  
“/services/httpd/mysite.com/www/mysite.socket”, “bin-path” =\>  
“/services/httpd/mysite.com/www/public/dispatch.fcgi”)))  
Â Â Â server.indexfiles = ( “index.html” )  
Â Â Â server.error-handler-404 = “/dispatch.fcgi”

}

Thanks.

Kyrre Nygaard
