- Lighttpd
- Andre Bogus
- 289字
- 2021-08-25 18:06:20
Chapter 2. Configuring and Running Lighttpd
In this chapter, we will learn:
- How to configure Lighttpd
- What Selectors are
- How to use Selectors
- How to rewrite and redirect requests
- How to include variables in the configuration files
Now that you have successfully installed Lighttpd onto your system, I will show you how to configure it to serve web pages (yes, just web pages, nothing else) and expand from there. Lighttpd needs a configuration file called lighttpd.conf
—in fact it will not run without one. To make it as simple as possible, we start with the absolute minimum:
server.document-root = "/var/www" mimetype.assign = ("" => "text/html")
Yes, that is all. Of course you should take the path to your website as your document root. Under UNIX, /var/www
is a probable path, while Windows users may want to put their site in a place like C:\www\mysite
. The mimetype.assign
statement simply says that everything is to be served as if it were an HTML page.
Put this lighttpd.conf
into the standard directory of your system:

In Windows, all the installers that I tested put the lighttpd.conf
file and run scripts under C:\lighttpd
by default. However, we might want to change the Lighttpd directory to suit our system, for example, we may want to put it under "Program Files" or on another disk drive. We may alternatively put the lighttpd.conf
file into any directory of our choice, but then the run scripts provided with Lighttpd may not work. This is not a big deal though, as we can still start Lighttpd directly from the command line. Note that under most systems, Lighttpd needs to be started from the administrator or root account so that it can listen to port 80.
- Moldflow 2010完全自學(xué)與速查手冊(模流分析·成本控制)
- Drools規(guī)則引擎技術(shù)指南
- 老郵差數(shù)碼照片處理技法 圖層篇
- DSP開發(fā)寶典
- After Effects CC 2019 影視后期特效合成案例教程
- 工業(yè)軟件研發(fā)、測試與質(zhì)量管理論叢
- 邊做邊學(xué):Photoshop+CorelDRAW綜合實訓(xùn)教程
- 寫給大家看的PPT設(shè)計書(第2版)
- 零基礎(chǔ)學(xué)后期:Lightroom 6-CC數(shù)碼照片處理從新手到高手
- 從零開始:Dreamweaver CS6中文版基礎(chǔ)培訓(xùn)教程
- 從零開始:Photoshop CS6中文版基礎(chǔ)培訓(xùn)教程
- 玩轉(zhuǎn)掌上生活 手機網(wǎng)上生活達人秘笈
- Photoshop CC平面設(shè)計實戰(zhàn)從入門到精通
- Adobe創(chuàng)意大學(xué)視頻編輯師 After Effects CS5 + Premiere Pro CS5 標(biāo)準(zhǔn)實訓(xùn)教材
- 人員應(yīng)急疏散仿真工程軟件:Pathfinder從入門到精通