lighttpd安裝配置

來源:互聯網
上載者:User

標籤:lighttpd cronlog fcgi

官網:

http://www.lighttpd.net/
http://www.cronolog.org

# 安裝依賴包yum -y install libevent libcurl gamin-devel pcre-devel zlib-devel bzip2-devel python-pycurl# 安裝lighttpdcd /usr/local/srctar xf lighttpd-1.4.35.tar.gzcd lighttpd-1.4.35./configure --with-fam --with-bzip2 --with-zlib --with-pcremakemake install# 安裝cronlog日誌 切割tar -zxvf cronolog-1.6.2.tar.gzcd cronolog-1.6.2./configuremakemake install# 安裝cgitar xf fcgi-2.4.0.tar.gz cd fcgi-2.4.0./configuremakemake installecho "/usr/local/lib" >> /etc/ld.so.confldconfig錯誤解決:make時候遇見報錯fcgio.cpp: In destructor ‘virtual fcgi_streambuf::~fcgi_streambuf()‘:fcgio.cpp:50:14: error: ‘EOF‘ was not declared in this scopefcgio.cpp: In member function ‘virtual int fcgi_streambuf::overflow(int)‘:fcgio.cpp:70:72: error: ‘EOF‘ was not declared in this scopefcgio.cpp:75:14: error: ‘EOF‘ was not declared in this scopefcgio.cpp: In member function ‘virtual int fcgi_streambuf::sync()‘:fcgio.cpp:86:18: error: ‘EOF‘ was not declared in this scopefcgio.cpp:87:41: error: ‘EOF‘ was not declared in this scopefcgio.cpp: In member function ‘virtual int fcgi_streambuf::underflow()‘:fcgio.cpp:113:35: error: ‘EOF‘ was not declared in this scope解決方案: 修改源碼include/fcgio.h 包含標頭檔#include <cstdio>,在make && make install,問題解決。# 檢測lighttpd配置 檔案文法/usr/local/sbin/lighttpd -f /data0/test.com/conf/lighttpd.conf -t# 啟動/usr/local/sbin/lighttpd -f /data0/test.com/conf/lighttpd.conf# 設定檔樣本:# vim lighttpd.confserver.modules              = (                               "mod_alias",                                "mod_access",                                "mod_fastcgi",                               "mod_extforward",                                "mod_accesslog" )server.document-root = "/data0/test.com/wwwroot/" extforward.forwarder = (     "1.1.1.1" => "trust",      "2.2.2.2" => "trust"   )server.errorlog             = "/data0/log/test.com/error.log"index-file.names            = ( "index.php", "index.html",                                "index.htm", "default.htm" )mimetype.assign             = (  ".pdf"          =>      "application/pdf",  ".sig"          =>      "application/pgp-signature",  ".spl"          =>      "application/futuresplash",  ".class"        =>      "application/octet-stream",  ".ps"           =>      "application/postscript",  ".torrent"      =>      "application/x-bittorrent",  ".dvi"          =>      "application/x-dvi",  ".gz"           =>      "application/x-gzip",  ".pac"          =>      "application/x-ns-proxy-autoconfig",  ".swf"          =>      "application/x-shockwave-flash",  ".tar.gz"       =>      "application/x-tgz",  ".tgz"          =>      "application/x-tgz",  ".tar"          =>      "application/x-tar",  ".zip"          =>      "application/zip",  ".mp3"          =>      "audio/mpeg",  ".m3u"          =>      "audio/x-mpegurl",  ".wma"          =>      "audio/x-ms-wma",  ".wax"          =>      "audio/x-ms-wax",  ".ogg"          =>      "application/ogg",  ".wav"          =>      "audio/x-wav",  ".gif"          =>      "image/gif",  ".jar"          =>      "application/x-java-archive",  ".jpg"          =>      "image/jpeg",  ".jpeg"         =>      "image/jpeg",  ".png"          =>      "image/png",  ".xbm"          =>      "image/x-xbitmap",  ".xpm"          =>      "image/x-xpixmap",  ".xwd"          =>      "image/x-xwindowdump",  ".css"          =>      "text/css",  ".html"         =>      "text/html",  ".htm"          =>      "text/html",  ".js"           =>      "text/javascript",  ".asc"          =>      "text/plain",  ".c"            =>      "text/plain",  ".cpp"          =>      "text/plain",  ".log"          =>      "text/plain",  ".conf"         =>      "text/plain",  ".text"         =>      "text/plain",  ".txt"          =>      "text/plain",  ".dtd"          =>      "text/xml",  ".xml"          =>      "text/xml",  ".mpeg"         =>      "video/mpeg",  ".mpg"          =>      "video/mpeg",  ".mov"          =>      "video/quicktime",  ".qt"           =>      "video/quicktime",  ".avi"          =>      "video/x-msvideo",  ".asf"          =>      "video/x-ms-asf",  ".asx"          =>      "video/x-ms-asf",  ".wmv"          =>      "video/x-ms-wmv",  ".bz2"          =>      "application/x-bzip",  ".tbz"          =>      "application/x-bzip-compressed-tar",  ".tar.bz2"      =>      "application/x-bzip-compressed-tar",  # default mime type  ""              =>      "application/octet-stream", )accesslog.filename = "|/usr/local/sbin/cronolog /data0/log/test.com/access.log.%Y%m%d"url.access-deny             = ( "~", ".inc" )$HTTP["url"] =~ "\.pdf$" {  server.range-requests = "disable"}alias.url += (            "/cgi-bin/" => "/data0/test.com/cgi-bin/"   )static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )server.port                = 81fastcgi.server             = (                "query_isp.fcgi"       => (                "localhost" => (                    "socket"            => "/tmp/query_isp.socket",                    "bin-path"          => "/data0/test.com/cgi-bin/query_isp.fcgi",                            "min-procs"         => 20,                               "max-procs"         => 20,                            "max-load-per-proc" => 100,                                "idle-timeout"      => 20,                        )                ),                "iplookup.fcgi"       => (                "localhost" => (                    "socket"            => "/tmp/iplookup.socket",                    "bin-path"          => "/data0/test.com/cgi-bin/iplookup.fcgi",                    "min-procs"         => 20,                    "max-procs"         => 20,                    "max-load-per-proc" => 100,                    "idle-timeout"      => 20,                                 )                )                            )


lighttpd安裝配置

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.