[Solved] Deny Access to specific url on virtual host
Added by doulkarezos about 6 years ago
Hi. A newbie question. (I think)
I`ve searched everywhere i can, but i can`t find the right answer for my problem.
I install rainloop webmail witch needs data folder inside webroot to be hidden from the internet. https://www.rainloop.net/docs/installation/
I enable virtual host for mail.mydomain.com & also redirect everything from http to https.
But i can`t find a way to deny access to /data folder inside webroot of rainloop.
I want to deny access to data folder only for this virtual host.
mod_access is enabled inside lighttpd.conf
i`ve tried to make a new file called access.conf inside /etc/lighttpd/conf-enabled
and i write inside
$HTTP["url"] == "mail.domain.com/data" {
url.access-deny = ("")
}
but it`s not working.
Replies (2)
RE: Deny Access to specific url on virtual host - Added by gstrauss about 6 years ago
$HTTP["host"] == "mail.domain.com" { $HTTP["url"] =~ "^/data(/|$)" { url.access-deny = ("") } }
RE: [Solved] Deny Access to specific url on virtual host - Added by doulkarezos about 6 years ago
It works but a new problem appears.
It don`t reads
SSL specified in /etc/lighttpd/conf-enabled/mail.domain.com.conf
instead it reads SSL from /etc/lighttpd/conf-enabled/letsencrypt.conf
To solve this
I delete access.conf and i put host deny parameters inside
/etc/lighttpd/conf-enabled/redirect.conf
which also holds configuration for https rediretion & www to non www redirection.
Now it works as expected!
Thank you!