Difference between revisions of "Lighttpd"

From Q
Jump to navigation Jump to search
Line 49: Line 49:
 
{{Box File|/etc/lighttpd/lighttpd.conf|
 
{{Box File|/etc/lighttpd/lighttpd.conf|
 
<pre>
 
<pre>
 +
server.modules = (
 +
    "mod_alias",
 +
)
 +
 
# uncomment for cgi support
 
# uncomment for cgi support
 
include "mod_cgi.conf"
 
include "mod_cgi.conf"
Line 56: Line 60:
 
{{Box File|/etc/lighttpd/mod_cgi.conf|
 
{{Box File|/etc/lighttpd/mod_cgi.conf|
 
<pre>
 
<pre>
$HTTP["url"] =~ "^/sensord/" {
+
$HTTP["url"] =~ "^/cgi-bin/" {
     dir-listing.activate = "disable"
+
    # disable directory listings
 +
     dir-listing.activate = "enable"
 +
    # only allow cgi's in this directory
 
     cgi.assign = (
 
     cgi.assign = (
 +
                ".pl"  =>      "/usr/bin/perl",
 +
                ".cgi"  =>      "/usr/bin/perl",
 
                 ".rrd"  =>      "/usr/bin/rrdcgi"
 
                 ".rrd"  =>      "/usr/bin/rrdcgi"
 
         )
 
         )
Line 64: Line 72:
 
</pre>
 
</pre>
 
}}
 
}}
 +
 +
{{Codeline|# mkdir -p /var/www/localhost/cgi-bin}}
 +
 +
{{Codeline|# chown -R lighttpd:root /var/www/localhost/cgi-bin}}
  
 
== Finalize ==
 
== Finalize ==

Revision as of 18:05, 27 August 2009

Description

Lightwight alternative to the allmighty Apache.

Dependencies

USE-Flags

Packages

Template:Box Code

Installation

# emerge lighttpd

Configuration

Setting up authentification

Template:Box File

Template:Box File

Enabling CGI Support and rrd file processing

Template:Box File

Template:Box File

# mkdir -p /var/www/localhost/cgi-bin

# chown -R lighttpd:root /var/www/localhost/cgi-bin

Finalize

# /etc/init.d/lighttpd start

# rc-update add lighttpd default