I'm new with NGINX server and I was wondering how to set something like this.
location phpmyadmin \.(gif|jpg|png)$ {
root /usr/share/phpmyadmin;
}
example above fails at server restart.
Thanks for all answers.
UPDATE:
location ~* .(gif|jpg|jpeg|png|ico|wmv|3gp|avi|mpg|mpeg|mp4|flv|mp3|mid|js|css|html|htm|wml)$ {
root /home/safeftp/www/public_html;
}
location ~ "phpmyadmin \.(gif|jpg|png)$" {
root /usr/share/phpmyadmin;
}
If you want to use regex, use ~
(for case-sensitive matching) or ~*
(for case-insensitive matching). Your location block should look like this:
location ~ "phpmyadmin \.(gif|jpg|png)$" {
root /usr/share/phpmyadmin;
}
You can read more here: http://nginx.org/en/docs/http/ngx_http_core_module.html#location
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With