Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Noob question - Root vs Alias and image_filter

$
0
0
Hi,

I'm starting with nginx, and I have some problems with resize of pictures. And when I'm trying my conf, I see I did not realy undersand some basic concepts.

My first problem :
I have a url like this : http://localhost/media/test/titi/toto.jpg
And it works good with this configuration :
location ~ /media/test/(.*) {
alias /var/www/html/toto/$1;
}

But it doen't work with this config.
location ~ /media/test/(.*) {
root /var/www/html/toto;
}
I don't understand why ?

My second problem is about resize. Why did it not work ?

location ~ /media/test/(.*) {
image_filter resize 50 10;
alias /var/www/html/toto/$1;
}

Thanks for your help.


Eric

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>