I am new in nginx and want to configure allow or disallow specific user-agent for specific directory.
Previously I was use apache for this and use below configuration.
/etc/httpd/conf.d/user_agent.conf
SetEnvIfNoCase User-Agent "^.*vlc.*" dvc
SetEnvIfNoCase User-Agent "^.*AppleCoreMedia.*" iphone
<Directory "/var/www/html/movies">
Order deny,allow
Deny from all
Allow from env=dvc 127.0.0.1
</Directory>
<Directory "/var/www/html/movies/trailers">
Order deny,allow
Deny from all
Allow from env=iphone
</Directory>
Please help me in nginx and suggest alternative solution in nginx.