lighttpd編譯完成後的一些配置
- 新建config,log,www,lig,cache,upload,vhosts資料夾
mkdir config ;然後從原始檔下的doc/config資料夾裡面的內容全都拷貝過去
touch /your path/log/lighttpd/error.log
2.修改配置檔案
vi config/lighttpd.conf
a. 路徑配置
var.log_root = "/ypur path/log/lighttpd"
var.server_root = "/your path/www"
var.state_dir = "/your path"
var.home_dir = "/your path"
var.conf_dir = "/yout path/config"
b.新增使用者
groupadd lighttpd
useradd -g lighttpd lighttpd
c. 修改目錄所有者
chown -R lighttpd:lighttpd /your path/log/lighttpd
chown -R lighttpd:lighttpd /your path/www
3.測試下
sudo ./lighttpd -t -f ../config/lighttpd
測試ok了,開啟lighttpd
sudo ./lighttpd -f ../config/lighttpd
在www下寫一個index.html文件,在瀏覽器裡瀏覽下。