当前位置: 首页 > 工具软件 > lighttpd-cpp > 使用案例 >

轻量级php服务器,ubuntu lighttpd轻量级web服务器

羿季
2023-12-01

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"          =>      "p_w_picpath/gif",

".jar"          =>      "application/x-java-archive",

".jpg"          =>      "p_w_picpath/jpeg",

".jpeg"         =>      "p_w_picpath/jpeg",

".png"          =>      "p_w_picpath/png",

".xbm"          =>      "p_w_picpath/x-xbitmap",

".xpm"          =>      "p_w_picpath/x-xpixmap",

".xwd"          =>      "p_w_picpath/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",

""              =>      "application/octet-stream",

)

url.access-deny             = ( "~", ".inc" )

$HTTP["url"] =~ "\.pdf$" {

server.range-requests = "disable"

}

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

server.port                = 80                             #监听端口

server.bind                = "192.168.6.106"     #绑定IP

server.pid-file            = "/var/run/lighttpd.pid"

server.username            = "www-data"       #运行服务用户

server.groupname           = "www-data"      #运行服务用户组

fastcgi.server             = ( ".php" =>

( "localhost" =>

(

"socket" => "/usr/local/lighttpd/run/php-fastcgi.socket",

"bin-path" => "/usr/local/php/bin/php-cgi"   #php-cgi

)

)

)

server.max-fds = 20480   # 文件描述符数目

server.max-keep-alive-requests = 0  #保持会话连接

server.network-backend = "linux-sendfile"

server.event-handler = "linux-sysepoll"   # Linux环境下epoll系统调用可提高吞吐量

 类似资料: