日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

用Lighttpd做图片服务器

發布時間:2025/3/20 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 用Lighttpd做图片服务器 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

http://www.lsanotes.cn/install_lighttpd

用Lighttpd做圖片服務器

一.安裝lighttpd所需的庫文件
1.安裝 pcre
wget?ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.gz

tar -zxvf pcre-8.10.tar.gz cd pcre-8.10 ./configure make make install

2.安裝zlib
wget?http://zlib.net/zlib-1.2.5.tar.gz

tar -zxvf zlib-1.2.5.tar.gz cd zlib-1.2.5 ./configure make make install

3.安裝bzip2
wget?http://www.bzip.org/1.0.5/bzip2-1.0.5.tar.gz

cd bzip2-1.0.5 make make install

二.安裝lighttpd
1.下載lighttpd
wget?http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.28.tar.gz
2.編譯安裝

tar -zxvf lighttpd-1.4.28.tar.gz cd lighttpd-1.4.28 groupadd lighttpd useradd –g lighttpd lighttpd ./configure --prefix=/usr/local/lighttpd make make install

注意事項
如果make時出現類似以下錯誤

/usr/local/lib/libbz2.a: could not read symbols: Bad value

則需要重新安裝bzip2,修改bzip2的Makefile文件
vim Makefile

CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)?? #找到此行添加-fPIC,如下: CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) -fPIC

然后重新編譯bzip和lighttpd
3.更改配置文件

cp -r doc/config? /usr/local/lighttpd/ mkdir -p /var/log/lighttpd chown -R lighttpd.lighttpd /var/log/lighttpd mkdir –p /usr/www/htdocs chown –R lighttpd.lighttpd /usr/www/htdocs

4.配置文件內容:
vim/usr/local/lighttpd/config/lighttpd.conf

var.log_root??? = "/var/log/lighttpd" var.server_root = "/usr/www" var.state_dir?? = "/var/run" var.home_dir??? = "/usr/local/lighttpd/sbin/lighttpd" var.conf_dir??? = "/usr/local/lighttpd/config"var.vhosts_dir? = server_root + "/vhosts" var.cache_dir?? = "/var/cache/lighttpd" var.socket_dir? = home_dir + "/sockets"include "modules.conf" server.port = 80server.username? = "lighttpd" server.groupname = "lighttpd"server.document-root = server_root + "/htdocs" server.pid-file = state_dir + "/lighttpd.pid" server.errorlog???????????? = log_root + "/error.log"include "conf.d/access_log.conf" include "conf.d/debug.conf"server.event-handler = "linux-sysepoll" server.network-backend = "linux-sendfile" server.max-fds = 2048 server.stat-cache-engine = "simple" server.max-connections = 1024index-file.names += ("index.xhtml", "index.html", "index.htm", "default.htm", "index.php" )url.access-deny???????????? = ( "~", ".inc" )$HTTP["url"] =~ "\.pdf$" {server.range-requests = "disable" }static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )include "conf.d/mime.conf" include "conf.d/dirlisting.conf" server.follow-symlink = "enable" server.upload-dirs = ( "/var/tmp" )

圖片存放在/usr/www/htdocs下面,生成的圖片是以/年/月/日的形式存放的

三.啟動lighttpd

/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/config/lighttpd ??Nginx+keepalived做雙機熱備加tomcat負載均衡 用shell腳本分析Nginx訪問日志IP地址來源??

?

轉載于:https://www.cnblogs.com/fx2008/p/4071814.html

總結

以上是生活随笔為你收集整理的用Lighttpd做图片服务器的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。