Project

General

Profile

GetLighttpd » History » Revision 22

Revision 21 (gstrauss, 2021-07-15 00:15) → Revision 22/23 (gstrauss, 2021-07-15 00:22)

{{>toc}} 

 h2. +source code+ source code 

 [[InstallFromSource|lighttpd source code and build instructions]] for experts 

 


 h2. +binary packages+ binary packages 

 On most systems you can install the current lighttpd-1.4.x version via the package management: 

 h3. Debian based systems 

 @aptitude install lighttpd lighttpd-doc@ 
 or 
 @apt-get install lighttpd lighttpd-doc@ 

 Websites: 
 * Debian: http://packages.debian.org/source/lighttpd  
 * Ubuntu: http://packages.ubuntu.com/source/lighttpd 

 Some modules are only available from extra packages (see the website) 

 h3. openSUSE 

 @zypper install lighttpd@ 

 Website: 
 * http://software.opensuse.org/search?baseproject=ALL&p=1&q=lighttpd 
 * http://download.opensuse.org/repositories/server:/http/ 
   The buildservice from opensuse may contain packages for other systems too 

 <pre> 
 zypper install lighttpd 
 </pre> 

 Some modules are only available from extra packages (use @zypper search lighttpd@ to find them) 

 Other repositories (may contain more up to date packages, especially for older distributions) 

 * http://software.opensuse.org/search?baseproject=ALL&p=1&q=lighttpd (openSUSE buildservice), packages for debian stable (i386 + amd64) 
   Generic hints for sources.list from openSUSE buildservice: http://en.opensuse.org/openSUSE:Build_Service_Debian_builds#Configuring_sources.list 
   Download the keys and add them with @sudo apt-key add downloaded-file@ to trust them. 
 ** http://download.opensuse.org/repositories/home:/stbuehler:/lighttpd-1.4.x/ 
    <pre> 
 deb http://download.opensuse.org/repositories/home:/stbuehler:/lighttpd-1.4.x/Debian_8.0 ./ 
 </pre> Key: http://download.opensuse.org/repositories/home:/stbuehler:/lighttpd-1.4.x/Debian_8.0/Release.key 
 ** http://download.opensuse.org/repositories/home:/stbuehler:/lighttpd-1.4.x-nightlies/ 
    <pre> 
 deb http://download.opensuse.org/repositories/home:/stbuehler:/lighttpd-1.4.x-nightlies/Debian_8.0 ./ 
 </pre> Key: http://download.opensuse.org/repositories/home:/stbuehler:/lighttpd-1.4.x-nightlies/Debian_8.0/Release.key 

 h3. YUM based systems 

 @yum <pre> 
 yum install lighttpd@ lighttpd 
 </pre> 

 h3. Gentoo 

 @emerge lighttpd@ <pre> 
 emerge lighttpd 
 </pre> 

 * Please note: 
   Don't neglect to set the proper USE flags for your lighty installation and all its dependencies. Take a look at the flags Portage would use by running emerge with the --pretend --verbose --tree options. This will pretend to install lighttpd and display some informative output, such as all USE flags and dependencies: @emerge 
   <pre> 
 emerge -pvt lighttpd@ 

 lighttpd 
 </pre> 

   If necessary, add your desired flags to /etc/portage/package.use. For example, if you want to emerge lighttpd with support for MySQL and PHP but without SSL, set the according USE flags: @echo 
   <pre> 
 echo "www-servers/lighttpd php mysql -ssl" >> /etc/portage/package.use@ /etc/portage/package.use 
 </pre> 

 h3. FreeBSD ports 

 FreeBSD has the ports and lighttpd is in this tree for a long time now. 

 <pre> 
 cd /usr/ports/www/lighttpd 
 make install clean 
 </pre> 

 If you don't get the configuration dialog, do @make config@ first. The additional CONFIG_ARGS for the PHP5 installation force cgi-fcgi support in /usr/local/bin/php. The option @--with-pcre-regex@ is needed to support several functions that use regular expressions like 'preg_match', and you really want that for things like conditionals, rewrite and redirect. 

 Now that everything is installed, enable lighttpd in rc.conf and edit it's configuration: 

 <pre> 
 echo lighttpd_enable=\"YES\" >> /etc/rc.conf 
 cd /usr/local/etc/ 
 cp lighttpd.conf.sample lighttpd.conf 
 </pre> 

 You will probably need to create some directories and files, since the port neglects to do them for you (as of 2008 February 24), and make them accessible by the user and group "www" that lighttpd operates as: 

 <pre> 
 mkdir /var/log/lighttpd 
 touch /var/log/lighttpd/lighttpd.error.log 
 touch /var/log/lighttpd/lighttpd.access.log 
 chown www:www /var/log/lighttpd 
 chown www:www /var/log/lighttpd/lighttpd.error.log 
 chown www:www /var/log/lighttpd/lighttpd.access.log 
 </pre> 

 Edit lighttpd.conf to use the new directories and files as follows: 
 * @server.errorlog = "/var/log/lighttpd/lighttpd.error.log"@ 
 * @accesslog.filename = "/var/log/lighttpd/lighttpd.access.log"@ 

 Edit lighttpd.conf docroot: 
 * @server.document-root = "/usr/local/www/"@