[Solved] Access only for Agent string
Added by plittlefield over 7 years ago
Hello Folks,
How would I restrict access to a whole host based on their remote browser agent string?
Thanks in advance.
Paully
Replies (2)
RE: Access only for Agent string - Added by gstrauss over 7 years ago
Please refer to the documentation: https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_Configuration and see $HTTP["useragent"]
Also see https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModAccess
RE: Access only for Agent string - Added by plittlefield over 7 years ago
Great, thank you!
So, if I wanted to make sure and allow only GoogleDocs to access my web site, I could put both of these checks one after the other?
(I have to allow that range because Google will not reveal it's servers IP addresses)
$HTTP["host"] == "data.domain.com" { $HTTP["remoteip"] !~ "66.249.*.*|66.102.*.*" { url.access-deny = ( "" ) } $HTTP["useragent"] !~ "GoogleDocs" { url.access-deny = ( "" ) } server.document-root = "/var/www/data.domain.com/html" server.errorlog = "/var/www/data.domain.com/logs/error.log" accesslog.filename = "/var/www/data.domain.com/logs/access.log" }
Paully