simple-vhost.default-host = "www.example.com"
create your virtual host directory
create a test file
啟用 ssl 子產品
建立 ssl 證書
301重定向
lighttpd 實作上面 apache功能
example 1
example 2
example 3
ref: http://redmine.lighttpd.net/wiki/lighttpd/MigratingFromApache
enable auth
/etc/lighttpd/conf-enabled/05-auth.conf
create a passwd file
$ sudo /etc/init.d/lighttpd reload
建立cache目錄
配置lighttpd.conf檔案
找到server.modules清單,去掉"mod_compress"注釋,再打開compress module的注釋
Compressing Dynamic Content
php.ini
最後使用telnet測試
telnet www.bg7nyt.cn 80
看到亂碼輸出,而非HTML,表示配置成功.
<a></a>
例 49.2. lighttpd compress
<access|modification> <number> <years|months|days|hours|minutes|seconds>
Example to include all sub-directories:
例 49.3. lighttpd expire
enable fastcgi
下載下傳PHP
configure
其它有用的子產品
符号連接配接
env
使用 php -v FastCGI 安裝情況
php -v
顯示(cgi-fcgi)表示正确
(cgi-fcgi)不能正常工作
使用 php -m 檢視PHP Modules
<a href="http://www.netkiller.cn/linux/">參考php安裝</a>
找到 fastcgi.server 去掉注釋
bin-path 改為PHP程式安裝目錄
下面例子更複雜一些
/usr/local/lighttpd/etc/lighttpd.conf
/usr/local/lighttpd/etc/php-fastcgi.conf
PHP FastCGI環境測試
echo "<?php phpinfo(); ?>" > /www/pages/index.php
curl http://127.0.0.1/index.php
生成項目
web server
helloworld.py
urls.py
啟動Web Server
curl http://127.0.0.1:8000/
Debian/Ubuntu
采用源碼安裝
sudo python setup.py install

decoder jpeg not available
首先确認jpeg庫是否安裝
find / -name jpeglib.h
然後修改頭檔案
Imaging-1.1.6/libImaging
修改Jpeg.h, #include "jpeglib.h" 改為
#include "/usr/include/jpeglib.h"
install fastcgi module
The examples also use a virtual host regexp that matches either www.myapp.com or myapp.com
Starting the FastCGI server
lighttpd.conf
$ sudo vim /etc/lighttpd/conf-available/10-fastcgi.conf
restart lighttpd
Testing
http://127.0.0.1/
More advanced configuration
例 49.4. fastcgi.conf
php-fpm.conf
nginx 配置
原文出處:Netkiller 系列 手劄
本文作者:陳景峯
轉載請與作者聯系,同時請務必标明文章原始出處和作者資訊及本聲明。