[b]Step 0 [/b]
System envrionment , Ubuntu 10.04
Downloading from [url]http://www.lighttpd.net/download[/url]
[b]Step 1 [/b]
[b]
Step 2 installing dependencies[/b]
[b]Step 3 installing[/b]
[b]Step 4 configuration[/b]
[b]Step 5 setting[/b]
Now, you will see this line below, maybe you need to change the user name, that is my user for running the lighttpd.
and, if your website root directory is here.
So,
and open this line of commend,
then set the port,
Finally, typing this command in terminal,
Now, opening your bowser with the address [url]http://localhost:8080 [/url]
you will see 'Hello lighttpd!', good luck to you!
In addition. you could add the command aliases to your ~/.bash_aliases
System envrionment , Ubuntu 10.04
Downloading from [url]http://www.lighttpd.net/download[/url]
[b]Step 1 [/b]
sudo su
tar -xf lighttpd-1.4.29.tar.gz
cd lighttpd-1.4.29[b]
Step 2 installing dependencies[/b]
apt-get install libssl-dev zlib1g-dev libbz2-dev libattr1-dev libpcre3-dev libmysqlclient15-dev libfam-dev libldap2-dev libfcgi-dev libgdbm-dev libmemcache-dev liblua5.1-0-dev pkg-config uuid-dev libsqlite3-dev libxml2-dev libkrb5-dev[b]Step 3 installing[/b]
./configure --prefix=/usr/local/lighttpd
make && make install[b]Step 4 configuration[/b]
mkdir /etc/lighttpd
cp doc/config/lighttpd.conf /etc/lighttpd/
cp doc/config/modules.conf /etc/lighttpd/
cp -r doc/config/conf.d/ /etc/lighttpd/
[b]Step 5 setting[/b]
vi /etc/lighttpd/lighttpd.conf
Now, you will see this line below, maybe you need to change the user name, that is my user for running the lighttpd.
server.username = "www-data"
server.groupname = "www-data"and, if your website root directory is here.
var.server_root = "/var/www"So,
mkdir /var/www/htdocs
touch /var/www/htdocs/index.html
echo 'Hello lighttpd!' >> /var/www/htdocs/index.html
and open this line of commend,
server.bind = "localhost"
then set the port,
server.port = 8080
Finally, typing this command in terminal,
/usr/local/lighttpd/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf Now, opening your bowser with the address [url]http://localhost:8080 [/url]
you will see 'Hello lighttpd!', good luck to you!
In addition. you could add the command aliases to your ~/.bash_aliases
alias lighttpd='/usr/local/lighttpd/sbin/lighttpd'
alias lll='/usr/local/lighttpd/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf'
alias www='cd /var/www/htdocs'
本文详细介绍如何在Ubuntu 10.04环境下从下载到配置完成Lighttpd Web服务器的全过程,包括依赖安装、配置文件调整及启动命令等关键步骤。
1270

被折叠的 条评论
为什么被折叠?



