I’m thinking about creating a Wiki for my local Pen and Paper group. I live in Germany, so basically any public website hosted here needs my name/address on it (which I’d rather not share, obviously). That’s why I wanted to restrict access to http://<your.IP>/wiki via lighttpd (if you access the page, you need to enter username and password before seeing anything), and I have some questions about that:
Which file do I have to edit for that? Will there be a file for wiki in /etc/lighttpd/conf-enabled ?
# deny the access to www.example.org to all user which
# are not in the 10.0.0.0/8 network
$HTTP["host"] == "www.example.org" {
$HTTP["remoteip"] != "10.0.0.0/8" {
url.access-deny = ( "" )
}
}
# Allow only 200.19.1.5 and 210.45.2.7 to
# have access to www.example.org/admin/
$HTTP["host"] == "www.example.org" {
# !~ is a perl style regular expression not match
$HTTP["remoteip"] !~ "^(200\.19\.1\.5|210\.45\.2\.7)$" {
$HTTP["url"] =~ "^/admin/" {
url.access-deny = ( "" )
}
}
}
Best would be to create your own config file in /etc/lighttpd/conf-available/ like 99-myown.conf and then symlink it to the conf-enabled directory.