hello i have this config in my apache
<Directory "/phpmyadmin/">
Require all denied
</Directory>
how i can make this code valid for nginx config
this is what i tried
location /phpmyadmin {
Deny All;
}
but when i close my nginx server i got this
nginx: [emerg] unknown directive "Deny" in C:nginx/conf/nginx.conf:49
someone know how to fix this ??
2
Answers
Apache and nginx share little to none config params. For nginx deny, you go with
To restrict a directory or multiple directories in nginx conf file, you can do like this:
in your case, you can try like this:
If you want, you can redirect to a specific route too based on the status code.