<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yorick</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yorick"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Yorick"/>
	<updated>2026-05-02T02:33:24Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Lighttpd&amp;diff=26932</id>
		<title>Lighttpd</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Lighttpd&amp;diff=26932"/>
		<updated>2024-07-16T10:12:05Z</updated>

		<summary type="html">&lt;p&gt;Yorick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Its name is a portmanteau of &amp;quot;light&amp;quot; and &amp;quot;httpd&amp;quot;: [https://www.lighttpd.net/ lighttpd] is a simple, standards-compliant, secure, and flexible web server. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;lighttpd is a powerful server, made long ago to handle upwards of 10,000 connections in parallel on one server&#039;&#039;&#039;. It was used in wikipedia server a long time ago and also some google services.&lt;br /&gt;
&lt;br /&gt;
{{Note|As for minimal sites and quick-start purposes, it is recommended due to its easy configuration process and excellent performance without much configuration. Check https://w3techs.com/technologies/details/ws-lighttpd and note that it is used in high traffic and important sites like postgresql.org}}&lt;br /&gt;
&lt;br /&gt;
== General information ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature/Artifact !! Value/Name !! Observations&lt;br /&gt;
|-&lt;br /&gt;
| Main package name || lighttpd || &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;apk add lighttpd&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Manpages and DOCs packages || lighttpd-doc || &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;apk add lighttpd-doc&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Configuration file || {{Path|/etc/lighttpd/lighttpd.conf}} || A vanilla default configuration&lt;br /&gt;
|-&lt;br /&gt;
| Html place for system pages || {{Path|/var/www/localhost/htdocs/}} || Each web server in alpine has own path for that&lt;br /&gt;
|-&lt;br /&gt;
| Dynamic files (cache, extra) || {{Path|/var/lib/lighttpd/}} || Created dynamically, each server in alpine has own path for that&lt;br /&gt;
|-&lt;br /&gt;
| Log files (error, access, etc) || {{Path|/var/log/lighttpd/}} || Each web server in alpine has own path for that&lt;br /&gt;
|-&lt;br /&gt;
| User running the webserver || lighttpd || Others Linux used &amp;quot;www-data&amp;quot; alpine has as a group&lt;br /&gt;
|-&lt;br /&gt;
| Group to common to webserver || www-data || Used to share things amont others daemons or services, like redis or apache files&lt;br /&gt;
|-&lt;br /&gt;
| Programed on || C and lua || Main engine code in C, modules and config in Lua variants&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Important Limitations ====&lt;br /&gt;
&lt;br /&gt;
Some common hosting panels do not handle {{Pkg|lighttpd}} configuration management.&lt;br /&gt;
&lt;br /&gt;
No HTTP/3 support.&lt;br /&gt;
&lt;br /&gt;
As we read previously.. main purpose was handle several request on one server, so are focused on high load. &lt;br /&gt;
&lt;br /&gt;
As main front end web server are perfect and it&#039;s &#039;&#039;&#039;recommended as reverse proxy server for {{Pkg|apache2}} or {{Pkg|nginx}}&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Install Lighttpd ==&lt;br /&gt;
The installation works out of the box for static pages. After installing you can see webserver in action by putting any file inside the {{Path|/var/www/localhost/htdocs/}} directory.&lt;br /&gt;
&lt;br /&gt;
Per user web files are supported by default in {{Path|/home/&amp;lt;user&amp;gt;/public_html}} directory by default if we enable it (process are described below in further section &amp;quot;Lighttpd configuration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{Pkg|lighttpd}} is available in the Alpine Linux repositories. To install, simple launch the commands below:&lt;br /&gt;
{{cmd|apk add lighttpd&lt;br /&gt;
rc-update add lighttpd default&lt;br /&gt;
rc-service lighttpd restart}}&lt;br /&gt;
&lt;br /&gt;
== Testing Lighttpd ==&lt;br /&gt;
&lt;br /&gt;
This section is assuming that lighttpd is running. If you now launch a web browser from a remote system and point it to your web server, you will see a page that says &amp;quot;404 - Not Found&amp;quot;. Well, at the moment there is no content available but the server is up and running.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add a simple test page to get rid of the &amp;quot;404 - Not Found page&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|echo &#039;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;✔️&amp;lt;/title&amp;gt;&amp;lt;meta charset&amp;amp;#61;&amp;quot;utf-8&amp;quot;&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;Lighttpd is running!&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&#039; &amp;gt; /var/www/localhost/htdocs/index.html}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;For testing open a browser and go to {{ic|&amp;lt;nowiki&amp;gt;http://127.0.0.1/&amp;lt;/nowiki&amp;gt;}} and you should see &amp;quot;Lighttpd is running!&amp;quot;&#039;&#039;&#039;. Note the example usage of &amp;quot;127.0.0.1&amp;quot; indicating that the lighttpd server and the web browser are running on the same machine.&lt;br /&gt;
&lt;br /&gt;
If you are using alpine remotely, &#039;&#039;&#039;open a browser on your client machine, and go to {{ic|http://&amp;lt;webserveripaddres&amp;gt;/}}. The &amp;quot;webserveripaddres&amp;quot; is the IP address of your lighttpd server machine.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Lighttpd Configuration ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you just want to serve simple HTML pages lighttpd can be used out-of-box. No further configuration needed.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For production purposes the [[Production LAMP system: Lighttpd + PHP + MySQL]] wiki page will explain in details all the needs, there&#039;s the [[Production Lets Encrypt: dehydrated]] wiki page with futher information to use HTTPS and lets encrypt certificates.&lt;br /&gt;
&lt;br /&gt;
Due to the minimalism of alpine linux, &#039;&#039;&#039;unfortunately the lighttpd packaging only provided vanilla configurations not close to alpine or easy admin maintenance&#039;&#039;&#039;, see the [[Production LAMP system: Lighttpd + PHP + MySQL]] wiki page to goin in deep about configuring lighttpd web server.&lt;br /&gt;
&lt;br /&gt;
==== Controlling Lighttpd ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Start lighttpd&#039;&#039;&#039;&#039;&#039;: After the installation {{Pkg|lighttpd}} is not running. As we made in first section was started already but if you want to start {{Pkg|lighttpd}} manually use:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-service lighttpd start}}&lt;br /&gt;
&lt;br /&gt;
You will get a feedback about the status.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 * Caching service dependencies                                 [ ok ]&lt;br /&gt;
 * Starting lighttpd...                                         [ ok ]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Stop lighttpd&#039;&#039;&#039;&#039;&#039;: If you want to stop the web server use &#039;&#039;stop&#039;&#039; in the same way of previous command:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-service lighttpd stop}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Restart lighttpd&#039;&#039;&#039;&#039;&#039;: After changing the configuration file lighttpd needs to be restarted.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-service lighttpd restart}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Proper Runlevel&#039;&#039;&#039;&#039;&#039;: By default no services are added to start process, sysadmin must know what we want and what will services do, also other main reason are due in dockers there&#039;s no runlevels per se and Alpine linux are mostly used in dockers containers. You must added the servide only to the default runlevel, not to boot, because need networking activated&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add lighttpd default}}&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
In production web, LAMP means &#039;&#039;&#039;L&#039;&#039;&#039;inux + &#039;&#039;&#039;A&#039;&#039;&#039;pache + &#039;&#039;&#039;M&#039;&#039;&#039;ysql + &#039;&#039;&#039;P&#039;&#039;&#039;hp installed and integrated, but today the &amp;quot;A&amp;quot; of apache are more used as Nginx or Lighttpd, and the &amp;quot;M&amp;quot; of MySQL are more used as Mariadb, the LAMP focused documents are:&lt;br /&gt;
&lt;br /&gt;
* [[Setting_Up_Lighttpd_with_PHP|Setting Up Lighttpd with PHP]] &lt;br /&gt;
* [[Lighttpd Advanced security]] &lt;br /&gt;
&lt;br /&gt;
[[Category:Web_Server]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Yorick</name></author>
	</entry>
</feed>