Skip to content

Instantly share code, notes, and snippets.

@ecylmz
Created May 15, 2011 18:08
Show Gist options
  • Save ecylmz/973371 to your computer and use it in GitHub Desktop.
Save ecylmz/973371 to your computer and use it in GitHub Desktop.
server.modules = (
"mod_access",
"mod_alias",
"mod_accesslog",
"mod_webdav",
# "mod_compress",
# "mod_redirect",
# "mod_rewrite",
)
server.document-root = "/var/www"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 8080
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
"index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
include_shell "/usr/share/lighttpd/use-ipv6.pl"
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
$HTTP["host"] == "spa.ce.omu.edu.tr" {
server.document-root = "/var/www/"
alias.url = ( "/webdav" => "/var/www/web1/web" )
$HTTP["url"] =~ "^/webdav($|/)" {
webdav.activate = "enable"
webdav.is-readonly = "disable"
webdav.sqlite-db-name =
"/var/run/lighttpd/lighttpd.webdav_lock.db"
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile =
"/var/www/web1/passwd.dav"
auth.require = ( "" => ( "method" => "basic",
"realm" => "webdav",
"require" => "valid-user" ) )
}
}
sudo -s
apt-get install lighttpd lighttpd-mod-webdav apache2-utils
mkdir /var/run/lighttpd/
chown www-data:www-data /var/run/lighttpd/
lighty-enable-mod auth
mkdir -p /var/www/web1/web
chown www-data:www-data /var/www/web1/web
htpasswd -c /var/www/web1/passwd.dav test
chown root:www-data /var/www/web1/passwd.dav
chmod 640 /var/www/web1/passwd.dav
vi /etc/lighttpd/lighttpd.conf
# gistteki diğer dosya ile içeriği değiştirilir
/etc/init.d/lighttpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment