- Lighttpd
- Andre Bogus
- 431字
- 2021-08-25 18:06:20
Starting Lighttpd by Hand
Lighttpd can be started without the help of a startup script. The path to the Lighttpd executable depends on your system and installation. Given that it is in your path, we can start Lighttpd by using the following command:
lighttpd -f [full path to your config file]
With some distributions (especially some Windows builds), the -f option will be hardcoded, so we cannot and need not supply the configuration file path. When in doubt, refer to the documentation of the installation package.
There are also other command line options that are worth taking a look at:

Now, run Lighttpd from the command line or with the provided startup script and point your browser of choice to http://127.0.0.1/index.html
. Given that you have an index.html
, you should see it in your browser. If you see it, congratulations!—you have made your first step into a bright future as a Lighttpd user.
Otherwise, we should tackle the problem methodically. First, start Lighttpd with the -t
option to see if our configuration is parsed correctly; correct it if necessary. Next, see if the run script/Lighttpd startup failed. If it did, there are three possible culprits:
- Port 80 (which is standard for HTTP) is blocked by some other application. In this case, you should see something else in your browser (given that the other application that listens on port 80 speaks HTTP).
- Lighttpd does not have sufficient privileges to listen on port 80. Try running Lighttpd as root, or use ports higher than 1024, say, port 8080.
- Your Lighttpd installation or package is erroneous. Try another version or visit the forum at http://forum.lighttpd.net and ask for help.
If Lighttpd starts without error, make sure that your index.html
is in your document-root directory and readable by the Lighttpd instance. If that does not solve the problem, we will need some debugging to find out what has failed. To do this, extend your lighttpd.conf
file to include logging and up to four debug directives:
server.modules += ("mod_accesslog") server.errorlog = "/var/log/lighttpd/error.log" # or wherever you want to put it debug.log-file-not-found = "enabled" debug.log-request-header = "enabled" debug.log-request-handling = "enabled" debug.log-response-header = "enabled"
Now, you can restart Lighttpd, browse at http://127.0.0.1/index.html
, and look into your error log to see what went wrong.
Generally, setting options are done with [module].[option] = [value]
, where value can be a "string", a number, or a boolean (note that instead of "true" and "false" Lighttpd configuration expects "enabled" and "disabled" or a comma-separated list of values in parenthesis (like server.modules). You can also append values to list with [module].[option] += ([values]).
- 架構之美
- Photoshop圖形圖像設計案例教程(高等院校計算機任務驅動教改教材)
- AutoCAD 2019中文版從入門到精通
- Photoshop CS6中文版基礎培訓教程
- 專業級音樂制作理論與實踐Pro Tools:從入門到應用
- SketchUp/Piranesi印象彩繪表現項目實踐
- AutoCAD 2019中文版計算機輔助繪圖全攻略
- Photoshop CS6數碼照片處理入門到精通
- 玩轉微信5.0
- SolidWorks三維設計及工程圖速成
- Excel 2016 VBA入門與應用
- Photoshop移動UI設計
- Adobe創意大學視頻編輯師 After Effects CS5 + Premiere Pro CS5 標準實訓教材
- Photoshop 美工基礎與網店裝修(微課版)
- Flash ActionScript 3.0交互設計200例