Beranda | Obengkumana.Net
facebook twitter gplus
Breaking News
Loading...
Minggu, 30 Desember 2012

Multi Port-Lighttpd

=> packages:
- lighttpd
- lighttpd-mod-cgi
- openssl-uitl

=> command :
# cd /etc/lighttpd
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# chmod 0600 /etc/lighttpd/server.pem

=> config /etc/lighttpd/lighttpd.conf
--------------------------------------------------------------------------------------
server.modules = (
"mod_cgi",
)
server.network-backend = "write"
index-file.names = ( "index.html", "default.html", "index.htm", "default.htm", "index.php", "hotspotlogin.php", "coova.html" )
mimetype.assign = (
".pdf" => "application/pdf",
".class" => "application/octet-stream",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".svg" => "image/svg+xml",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml"
)

$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}

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

server.port = 85
server.document-root = "/usr/share/3ginfo/"
$SERVER["socket"] == ":9876" {
server.document-root = "/srv/www"
cgi.assign = ( ".sh" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl", ".php" => "/usr/bin/php-cgi" )
}

$SERVER["socket"] == ":99" {
server.document-root = "/srv/www/easyhotspot/htdocs"
}

server.pid-file = "/var/run/lighttpd.pid"
server.upload-dirs = ( "/tmp" )

cgi.assign = ( ".sh" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl", ".php" => "/usr/bin/php-cgi" )

$SERVER["socket"] == ":443" {
server.document-root = "/www/cgi-bin"
cgi.assign = ( "hotspotlogin.php" => "/usr/bin/php-cgi" )
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/server.pem"
}
---------------------------------------------------------------------

0 komentar:

Posting Komentar

 
Toggle Footer