Lighttpd: Difference between revisions

From Alpine Linux
(Created page with "[http://www.lighttpd.net/ lighttpd] is a simple, standards-compliant, secure, and flexible web server. ==General information== * Configuration file: /etc/lighttpd/lighttpd.con...")
 
mNo edit summary
Line 54: Line 54:
== Advanced configurations ==
== Advanced configurations ==


* [[Lighttp Https access|Securing Lighttpd with https]]
* [[Setting_Up_Lighttpd_with_PHP|Setting Up Lighttpd with PHP]]  
* [[Setting_Up_Lighttpd_with_PHP|Setting Up Lighttpd with PHP]]  
* [[Setting_Up_Lighttpd_With_FastCGI|Setting Up Lighttpd With FastCGI]]
* [[Setting_Up_Lighttpd_With_FastCGI|Setting Up Lighttpd With FastCGI]]


[[Category:Networking]]
[[Category:Networking]]

Revision as of 15:08, 15 June 2011

lighttpd is a simple, standards-compliant, secure, and flexible web server.

General information

  • Configuration file: /etc/lighttpd/lighttpd.conf
  • Standard directory for files: /var/www/localhost/htdocs/

Installation

lighttpd is available in the Alpine Linux repositories. To install, simple launch the command below:

apk add lighttpd

Configuration

If you just want to server simple HTML pages lighttpd can be used out-of-box. No further configuration needed.

Controlling Lighttpd

Start lighttpd

/etc/init.d/lighttpd start

You will get a feedback about the status.

 * Caching service dependencies                                 [ ok ]
 * Starting lighttpd...                                         [ ok ]

Stop lighttpd

If you want to stop the web server use stop.

/etc/init.d/lighttpd stop

Restart lighttpd

After changing the configuration file lighttpd needs to be restarted.

/etc/init.d/lighttpd restart

Runlevel

Normally you want to start the web server when the system is launching. This is done by adding lighttpd to the needed runlevel.

rc-update add lighttpd default

Testing Lighttpd

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 "404 - Not Found".

http://IP-ADDRESS/

At the moment there is no content to show. Let's add a simple test page.

echo "Lighttpd is running..." > /var/www/localhost/htdocs/index.html

Now you will get the test page if you reload.

Advanced configurations