Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server.modules = (
- "mod_access",
- "mod_alias",
- "mod_accesslog",
- "mod_compress",
- "mod_scgi",
- "mod_fastcgi",
- # "mod_auth",
- )
- server.document-root = "/var/www/"
- server.errorlog = "/var/log/lighttpd/error.log"
- index-file.names = ( "index.php", "index.html",
- "index.htm", "default.htm" )
- accesslog.filename = "/var/log/lighttpd/access.log"
- url.access-deny = ( "~", ".inc",".db", ".tpl.php", ".cls.php" )
- server.pid-file = "/var/run/lighttpd.pid"
- dir-listing.encoding = "utf-8"
- server.dir-listing = "enable"
- server.username = "www-data"
- server.groupname = "www-data"
- server.port = 80
- $HTTP["remoteip"] =~ "127.0.0.1" {
- alias.url += (
- "/doc/" => "/usr/share/doc/",
- "/images/" => "/usr/share/images/"
- )
- $HTTP["url"] =~ "^/doc/|^/images/" {
- dir-listing.activate = "enable"
- }
- }
- $HTTP["host"] == "127.0.0.1" { #change your server IP
- server.document-root = "/var/www/"
- server.errorlog = "/var/log/lighttpd/error.log"
- accesslog.filename = "/var/log/lighttpd/access.log"
- server.error-handler-404 = "/error-handler.php"
- }
- include_shell "/usr/share/lighttpd/create-mime.assign.pl"
- include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
- #fastcgi (low lighttpd version?)can let fastcgi script to move to /etc/lighttpd/conf-available/10-fastcgi-php5.conf
- fastcgi.server = (
- #fastcgi another script slection
- # ".php" => ((
- # "bin-path" => "/usr/bin/php-cgi",
- # "socket" => "/tmp/php.socket"
- # ))
- ".php" =>
- ((
- "bin-path" => "/usr/bin/php-cgi",
- "socket" => "/tmp/php.socket",
- "max-procs" => 2,
- "idle-timeout" => 20,
- "bin-environment" =>
- (
- "PHP_FCGI_CHILDREN" => "4",
- "PHP_FCGI_MAX_REQUESTS" => "10000"
- ),
- "bin-copy-environment" =>
- (
- "PATH", "SHELL", "USER"
- ),
- "broken-scriptfilename" => "enable"
- ))
- )
- scgi.server =(
- "/RPC2" => # RT_DIR
- ( "127.0.0.1" =>
- (
- #scgi port:wtorrent,rutorrent
- "host" => "127.0.0.1", # Ip where rtorrent is listening
- "port" => 5000, # Port specified in .rtorrent.rc
- "check-local" => "disable"
- #scgi socket:rutorrent
- #"socket" => "/tmp/rpc.socket",
- #"check-local" => "disable",
- #"disable-time" => 0, # don't disable scgi if connection fails
- )
- )
- )
- #rutorrent:password
- server.modules += ( "mod_auth" )
- auth.backend = "htdigest"
- auth.backend.htdigest.userfile = "/etc/lighttpd/.auth"
- auth.debug = 2
- auth.require = ( "/rutorrent/" =>
- (
- "method" => "digest",
- "realm" => "Authorized users only",
- "require" => "valid-user"
- )
- )
- #rutorrent:ssl
- $SERVER["socket"] == ":443" {
- ssl.engine = "enable"
- ssl.pemfile = "/etc/lighttpd/certs/lighttpd.pem"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement