Hello.
I have problem with location and access_log or error_log.
What I want is:
When someone accessed to "http://example.com/abcd/", I want logging to "test.access.log"
and I want do this for all access under "abcd" directory.
also, "http://example.com/abcd/cache/" uses alias to another directory.
so I writed config.
location /abcd/ {
access_log logs/abcd.access.log main;
error_log logs/abcd.error.log error;
alias I:/Test/;
autoindex on;
expires 3d;
}
location /abcd/cache/ {
alias I:/Cache/;
}
but, when someone accessed to "http://example.com/abcd/cache/", it logged to main log file.
I readed wiki and I thought "location /abcd/" applies to all request started with "/abcd/"...
I have no clue...
Can someone expain this?