close

敬告遊客:
以下內容枯燥無聊,若情非得已不建議進入。
若仍執意進入,當有頭暈嘔吐現象時請盡速離開本篇文章。


 

1.build lighttpd
#./configure --prefix=/usr/local/lighttpd --with-openssl
#make
#make install

 

//1-1.check the lighttpd is build correctly.
#/usr/local/lighttpd/sbin/lighttpd -v

result:

lighttpd/1.4.23-devel-fbc0954 (ssl) - a light and fast webserver
Build-Date: Mar 24 2010 14:38:23

 

 

2.modify the lighttpd.conf
#vi /usr/local/lighttpd/conf/lighttpd.conf
add the following config into config file

 

$SERVER["socket"] == "172.19.67.157:443" {
server.document-root = "/home/claire/lighttpd-1.4.23/htdocs/"
# server.name = "yourdomain.com"
# server.errorlog = "/www/logs/yourdomain_error.log"
# accesslog.filename = "/www/logs/yourdomain_access.log"
# SSL related stuff below
ssl.engine = "enable"
ssl.ca-file = "/home/claire/lighttpd-1.4.23/htdocs/root.pem"
ssl.pemfile = "/home/claire/lighttpd-1.4.23/htdocs/cert-srv.pem"
}


//2-1.check the config file sytax is
#cd /usr/local/lighttpd
#sbin/lighttpd -t -f conf/lighttpd.conf
result:Syntax OK

 

 

3.prepare the cert files
put server cert(cert-srv.pem) and ca cert(root.pem) to the correct path


4.run the https server
//4-1.do not run the server in the background, if the cert needs pass phrase
#sbin/lighttpd -D -f conf/lighttpd.conf
result:Enter PEM pass phrase:
input the cert pass phrase.

 

 

//4-2.verify the https lighttpd is running
#netstat -tulpn | grep :443
 

result:

 tcp 0 0 172.19.67.157:443 0.0.0.0:* LISTEN -


 

==info from lighttpd==
1.Installing and configuring lighttpd webserver – HOWTO
http://www.cyberciti.biz/tips/installing-and-configuring-lighttpd-webserver-howto.html

2.Howto: Linux Lighttpd SSL (Secure Server Layer) Https Configuration And Installation
http://www.cyberciti.biz/tips/how-to-install-ssl-lighttpd-https-configuration.html

3.How To Lighttpd Create Self Signed SSL Certificates
http://www.cyberciti.biz/tips/howto-lighttpd-create-self-signed-ssl-certificates.html

 

 

 

==more info==
http://forum.startcom.org/viewtopic.php?t=719
https://calomel.org/lighttpd.html
https://calomel.org/ssl_certs.html
http://www.rootninja.com/create-ssl-certs-and-enable-https-with-lighttpd/

 

 

arrow
arrow
    全站熱搜

    calories 發表在 痞客邦 留言(0) 人氣()