I have a folder with images that I need to be lightweight hosted. So I decided to go for lighttpd.
So I read that I had to add the following option in the config file:
mimetype.use-xattr = "enable"
It didn't work, when loading an image it was sended with an application/octet-stream
file type header, and the browser would download it.
I read that the --use-attr
was a flag when compiling, so I thought that maybe it was compiled without it (the build was from the Ubuntu repo) (the documentation says that the flag is actually --use-atttr
but I think is a typo error since it says that option is unrecognized when I run configure
).
So I downloaded the source and compiled and installed it with that flag:
configure --with-attr
make
make install
And here are the lighttpd features and version:
/usr/local/sbin/lighttpd -V
lighttpd/1.4.30-devel-2805 - a light and fast webserver
Build-Date: Oct 6 2011 10:39:46
Event Handlers:
+ select (generic)
+ poll (Unix)
- rt-signals (Linux 2.4+)
+ epoll (Linux 2.6)
- /dev/poll (Solaris)
- eventports (Solaris)
- kqueue (FreeBSD)
- libev (generic)
Network handler:
+ sendfile
Features:
+ IPv6 support
+ zlib support
+ bzip2 support
+ crypt support
- SSL Support
+ PCRE support
- mySQL support
- LDAP support
- memcached support
- FAM support
- LUA support
- xml support
- SQLite support
- GDBM support