User Tools

Site Tools


software:lighttpd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
software:lighttpd [2020-01-26 20:29] – Add DokuWiki section zlgsoftware:lighttpd [2020-05-26 00:10] (current) – Better match the name zlg
Line 1: Line 1:
 ====== lighttpd ====== ====== lighttpd ======
  
-[[https://lighttpd.net|Lighttpd]] (AKA lighty) is a **light**weight **HTTP** server written in C that specializes in low resource usage. Its configuration is powerful, but more terse than Apache and nginx. Due to lighty's focus on resource use, it has a variety of strategies for dealing with high resource use.+[[https://lighttpd.net|Lighttpd]] (AKA lighty) is a **light**weight **HTTP** **d**aemon (serverwritten in C that specializes in low resource usage. Its configuration is powerful, but more terse than Apache and nginx. Due to lighty's focus on resource use, it has a variety of strategies for dealing with high resource use.
  
 Since lighttpd doesn't get much attention in documentation, this page will cover steps to take for common applications or settings that make life easier. Since lighttpd doesn't get much attention in documentation, this page will cover steps to take for common applications or settings that make life easier.
Line 21: Line 21:
  
 ===== cgit ===== ===== cgit =====
 +
 +[[https://git.zx2c4.com/cgit|Cgit]] is a CGI-powered Git front-end written in C, using Git's own source code for its heavy lifting.
  
 Create a new cgit-oriented file somewhere in your configuration hierarchy. Then be sure you're ''include''ing it in lighttpd's main configuration file. Create a new cgit-oriented file somewhere in your configuration hierarchy. Then be sure you're ''include''ing it in lighttpd's main configuration file.
Line 50: Line 52:
 </code> </code>
  
-Your OS may do things differently; the above is where they're stored for Adélie Linux and Gentoo Linux.+Your OS may do things differently; the above is where they're stored on my machine.
  
 Next, be sure you have the correct modules enabled. Additionally, you need to setup a temporary file space with permissions that allow the server to read and write to it. Highlighted source code view with cgit can be rather large, and lighttpd will switch to temporary files when a transfer of data is large enough. Next, be sure you have the correct modules enabled. Additionally, you need to setup a temporary file space with permissions that allow the server to read and write to it. Highlighted source code view with cgit can be rather large, and lighttpd will switch to temporary files when a transfer of data is large enough.
  
 <file conf /etc/lighttpd/lighttpd.conf> <file conf /etc/lighttpd/lighttpd.conf>
-server,modules += ( "mod_cgi", "mod_dirlisting" )+server.modules += ( "mod_cgi", "mod_dirlisting" )
 # Change this to suit your needs: # Change this to suit your needs:
 server.upload-dirs = ( "/var/tmp/lighttpd" ) server.upload-dirs = ( "/var/tmp/lighttpd" )
Line 93: Line 95:
             "socket" = "/path/to/socket", # I put mine under /var/run             "socket" = "/path/to/socket", # I put mine under /var/run
             "x-sendfile" => "enable",             "x-sendfile" => "enable",
-            "x-sendfile-docroot" => ( server.document-root + '/data/media' )  # For me it's /srv/www/wiki+            "x-sendfile-docroot" => ( server.document-root )  # For me it's /srv/www/wiki
         )         )
     )     )
software/lighttpd.1580070548.txt.gz · Last modified: 2020-01-26 20:29 by zlg