Lighttpd

Lighttpd Secure Configuration

Reference:

Configure Drupal-6 on Lighttpd

This is what I did:

Setup cgi-bin Access on Lighttpd

Turn on mod_alias and mod_cgi

To setup cgi-bin access, you have to enable both the mod_alias and mod_cgi in /etc/lighttpd/lighttpd.conf:

server.modules += ( "mod_alias" )

include "mod_cgi.conf"

Setup cgi-bin access in localhost

Lighttpd installation came with a mod_cgi.conf in /etc/lighttpd. Check that file to make sure that it has:

Install and Configure lighttpd + PHP on Gentoo

Install lighttpd and php

  1. Read http://gentoo-wiki.com/HOWTO_Lighttpd and decide which USE flags you will need. Write those flags into /etc/portage/package.use. Since I plan to use fastcgi and php, I do have at least these two flags set.
  2. Check php installation. If php was installed but cgi USE flag was off, you have to reinstall php with "USE=cgi".
  3. Now install lighttpd:
    # emerge -v lighttpd
  4. Among the few opcode cache for php, xcache is quite stable on lighttpd. So install that: