Lighttpd not serving files

lighttpd

I'm using lighttpd 1.4.19 on Ubuntu 9.04 and I'm having an odd problem. I'm using it to serve static content, mostly pictures. But when i go to the picture url, the picture doesn't actually show up. it loads, but theres nothing there. When I tried to get an mp3 from it, when I clicked the link, it downloaded the file, but it was 0Kb. which the actual file isn't. Can anyone tell me why this would happen and how to fix it?

Best Answer

Check your server logs to see what it says at /var/log/lighttpd/access.log. Most important column is the HTTP Status and Transfer size columns. If the status was 200 and the transfer size is XXXbytes, then the transfer had succeeded on lighttpd's side.

  • It could be a permissions problem. By default, lighttpd runs as user www-data and you need to make sure that that user can read those files that you are loading.
  • Try loading a static test.html file to see if it is a problem with content. If the text file transfers but not the media files, this might indicate another problem.
Related Topic